Commit 38b438fc authored by payno's avatar payno
Browse files

remove warning "is" instead of "=="

parent 7517058e
Pipeline #37834 passed with stages
in 4 minutes and 55 seconds
......@@ -336,7 +336,7 @@ def add_dark_flat_nx_file(
)
)
data_node = get_data(data)
if data_node.ndim is 3:
if data_node.ndim == 3:
n_frames_to_insert = data_node.shape[0]
else:
raise TypeError("{} as input is not managed".format(type(data)))
......@@ -485,7 +485,7 @@ def _insert_frame_data(data, file_path, data_path, where, logger=None):
raise ValueError(
"{} should point to 2D or 3D dataset ".format(url.path())
)
if data_frm_url.ndim is 2:
if data_frm_url.ndim == 2:
new_shape = 1, data_frm_url.shape[0], data_frm_url.shape[1]
if logger is not None:
logger.info(
......@@ -629,7 +629,7 @@ def _insert_frame_data(data, file_path, data_path, where, logger=None):
)
data_shape = o_h5s[url.data_path()].shape
data_type = o_h5s[url.data_path()].dtype
if len(data_shape) is 2:
if len(data_shape) == 2:
data_shape = (1, data_shape[0], data_shape[1])
layout = h5py.VirtualLayout(shape=data_shape, dtype=data_type)
layout[:] = h5py.VirtualSource(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment