Skip to content

Commit

Permalink
numpy '!= None' error
Browse files Browse the repository at this point in the history
  • Loading branch information
dvm-shlee committed Jul 5, 2023
1 parent c7f3f9b commit 3870e50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion brkraw/lib/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ def _get_matrix_size(self, visu_pars, dataobj=None):
if num_temporal_frame > 1:
matrix_size.append(num_temporal_frame)

if dataobj != None:
if isinstance(dataobj, np.ndarray):
# matrix size inspection
dataobj_shape = dataobj.shape[0]
if multiply_all(matrix_size) != dataobj_shape:
Expand Down
2 changes: 1 addition & 1 deletion brkraw/lib/orient.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def get_origin(slice_position, gradient_orient):
max_delta_axis = np.argmax([dx, dy, dz])
rx, ry, rz = [None, None, None]

if gradient_orient != None:
if isinstance(gradient_orient, np.ndarray):
zmat = np.zeros(gradient_orient[0].shape)
for cid, col in enumerate(gradient_orient[0].T):
yid = np.argmax(abs(col))
Expand Down

0 comments on commit 3870e50

Please sign in to comment.