SVD error
Created by: sulaymandesai
Hi,
I have been following the example notebooks on this GitHub page to perform SVD. I get the following error:
1 decomposer = px.processing.svd_utils.SVD(h5_main, num_components=100)
----> 2 h5_svd_group = decomposer.compute()
3
4 h5_u = h5_svd_group['U']
5 h5_v = h5_svd_group['V']
~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pycroscopy/processing/svd_utils.py in compute(self, override)
161 """
162 if self.__u is None and self.__v is None and self.__s is None:
--> 163 self.test(override=override)
164
165 if self.h5_results_grp is None:
~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pycroscopy/processing/svd_utils.py in test(self, override)
137 raise ValueError('Could not reshape U to N-Dimensional dataset! Error:' + success)
138
--> 139 v_mat, success = reshape_to_n_dims(self.__v, h5_pos=np.expand_dims(np.arange(self.__u.shape[1]), axis=1),
140 h5_spec=self.h5_main.h5_spec_inds)
141 if not success:
~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pyUSID/io/hdf_utils/model.py in reshape_to_n_dims(h5_main, h5_pos, h5_spec, get_labels, verbose, sort_dims, lazy)
84 else:
85 if not isinstance(h5_main, (h5py.Dataset, np.ndarray, da.core.Array)):
---> 86 raise TypeError('h5_main should either be a h5py.Dataset or numpy array')
87
88 if h5_pos is not None:
TypeError: h5_main should either be a h5py.Dataset or numpy array
Any help would be appreciated!