def _load_h5(filename): '''Delay loading of h5py until it is needed''' from neurom.io import hdf5 return hdf5.read(filename, remove_duplicates=False, data_wrapper=DataWrapper)
def _load_h5(filename): """Delay loading of h5py until it is needed.""" return hdf5.read(filename, remove_duplicates=False, data_wrapper=DataWrapper)
def test_consistency_between_v1_v2(): v1_data = hdf5.read(os.path.join(H5V1_PATH, 'Neuron.h5')) v2_data = hdf5.read(os.path.join(H5V2_PATH, 'Neuron.h5')) nt.ok_(np.allclose(v1_data.data_block, v2_data.data_block))
def test_consistency_between_h5_swc(): h5_data = hdf5.read(os.path.join(H5V1_PATH, 'Neuron.h5'), remove_duplicates=True) swc_data = swc.read(os.path.join(SWC_PATH, 'Neuron.swc')) nt.ok_(np.allclose(h5_data.data_block.shape, swc_data.data_block.shape))
def setup(self): self.data = hdf5.read(os.path.join(H5V2_PATH, 'Neuron.h5')) self.first_id = int(self.data.data_block[0][COLS.ID]) self.rows = len(self.data.data_block)
def read_h5(filename): '''Lazy loading of HDF5 reader''' from neurom.io import hdf5 return hdf5.read(filename, remove_duplicates=True, data_wrapper=DataWrapper)
def test_consistency_between_h5_swc(): h5_data = hdf5.read(Path(H5V1_PATH, 'Neuron.h5'), remove_duplicates=True) swc_data = swc.read(Path(SWC_PATH, 'Neuron.swc')) nt.ok_(np.allclose(h5_data.data_block.shape, swc_data.data_block.shape))
def test_consistency_between_v1_v2(): v1_data = hdf5.read(Path(H5V1_PATH, 'Neuron.h5')) v2_data = hdf5.read(Path(H5V2_PATH, 'Neuron.h5')) nt.ok_(np.allclose(v1_data.data_block, v2_data.data_block))
def setup(self): self.data = hdf5.read(Path(H5V2_PATH, 'Neuron.h5')) self.first_id = int(self.data.data_block[0][COLS.ID]) self.rows = len(self.data.data_block)