Skip to content

Commit

Permalink
fix minor regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
nir committed Oct 29, 2023
1 parent ba8e142 commit 0b29459
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
6 changes: 3 additions & 3 deletions examples/22-pong-RL.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
" if flip:\n",
" image = image.transpose(PIL.Image.Transpose.FLIP_TOP_BOTTOM)\n",
" \n",
" return image"
" return image.convert('RGB')"
]
},
{
Expand Down Expand Up @@ -465,9 +465,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0"
"version": "3.11.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
2 changes: 1 addition & 1 deletion jupylet/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def observe(self):

if self._use_shm:
shm = self.get_shared_memory()
shm.buf[:] = b
shm.buf[:len(b)] = b
return ('__ndarray__', (w, h, 4), 'uint8', shm.name)

return np.frombuffer(b, dtype='uint8').reshape(h, w, -1)
Expand Down
14 changes: 9 additions & 5 deletions jupylet/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,15 @@ def is_binder_env():

def is_numpy_openblas():
import numpy
ll = numpy.__config__.get_info('blas_opt_info').get('libraries', [])
for l in ll:
if 'openblas' in l:
return True
return False

if hasattr(numpy.__config__, 'get_info'):
ll = numpy.__config__.get_info('blas_opt_info').get('libraries', [])
for l in ll:
if 'openblas' in l:
return True
return False

return 'openblas' in repr(numpy.__config__.show('dicts'))


def is_osx():
Expand Down

0 comments on commit 0b29459

Please sign in to comment.