Skip to content

Commit

Permalink
Fix bcolz/utils.py AttributeError: 'NoneType' object has no attribute…
Browse files Browse the repository at this point in the history
… 'base' (#24)

Fixes #23
  • Loading branch information
rohitmanokaran committed Nov 17, 2022
1 parent eaff7fb commit 8758346
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bcolz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def to_ndarray(array, dtype, arrlen=None, safe=True):

# Arrays with a 0 stride are special
if type(array) == np.ndarray and len(array.strides) and array.strides[0] == 0:
if array.dtype != dtype.base:
if dtype is not None and array.dtype != dtype.base:
raise TypeError("dtypes do not match")
return array

Expand Down

0 comments on commit 8758346

Please sign in to comment.