@@ -351,7 +351,7 @@ def shift1D(self,
351351 ----------
352352 shift_array : numpy array
353353 An array containing the shifting amount. It must have
354- `axes_manager.navigation_shape ` shape.
354+ `axes_manager._navigation_shape_in_array ` shape.
355355 interpolation_method : str or int
356356 Specifies the kind of interpolation as a string ('linear',
357357 'nearest', 'zero', 'slinear', 'quadratic, 'cubic') or as an
@@ -488,7 +488,7 @@ def estimate_shift1D(self,
488488 reference_indices = self .axes_manager .indices
489489
490490 i1 , i2 = axis ._get_index (start ), axis ._get_index (end )
491- shift_array = np .zeros (self .axes_manager .navigation_shape )
491+ shift_array = np .zeros (self .axes_manager ._navigation_shape_in_array )
492492 ref = self .navigation_indexer [reference_indices ].data [i1 :i2 ]
493493 if interpolate is True :
494494 ref = utils .interpolate1D (ip , ref )
@@ -872,10 +872,10 @@ def find_peaks1D_ohaver(self, xdim=None,slope_thresh=0, amp_thresh=None,
872872
873873 Returns
874874 -------
875- peaks : structured array of shape navigation_shape in which each cells
876- contains an array that contains as many structured arrays as peaks
877- where found at that location and which fields: position, width, height
878- contains position, height, and width of each peak.
875+ peaks : structured array of shape _navigation_shape_in_array in which
876+ each cell contains an array that contains as many structured arrays as
877+ peaks where found at that location and which fields: position, width,
878+ height contains position, height, and width of each peak.
879879
880880 Raises
881881 ------
@@ -885,7 +885,7 @@ def find_peaks1D_ohaver(self, xdim=None,slope_thresh=0, amp_thresh=None,
885885 # TODO: add scipy.signal.find_peaks_cwt
886886 self ._check_signal_dimension_equals_one ()
887887 axis = self .axes_manager .signal_axes [0 ].axis
888- arr_shape = (self .axes_manager .navigation_shape
888+ arr_shape = (self .axes_manager ._navigation_shape_in_array
889889 if self .axes_manager .navigation_size > 0
890890 else [1 ,])
891891 peaks = np .zeros (arr_shape , dtype = object )
@@ -1247,7 +1247,7 @@ def _export_factors(self,
12471247 axes_dicts [1 ]['index_in_array' ] = 1
12481248
12491249 factor_data = factors .reshape (
1250- self .axes_manager .signal_shape + [- 1 ,])
1250+ self .axes_manager ._signal_shape_in_array + [- 1 ,])
12511251
12521252 for dim ,index in zip (comp_ids ,range (len (comp_ids ))):
12531253 im = Image (factor_data [...,index ],
@@ -3113,14 +3113,14 @@ def _get_navigation_signal(self):
31133113 return None
31143114 elif self .axes_manager .navigation_dimension == 1 :
31153115 from hyperspy .signals .spectrum import Spectrum
3116- s = Spectrum (np .zeros (self .axes_manager .navigation_shape ),
3116+ s = Spectrum (np .zeros (self .axes_manager ._navigation_shape_in_array ),
31173117 axes = self .axes_manager ._get_navigation_axes_dicts ())
31183118 elif self .axes_manager .navigation_dimension == 2 :
31193119 from hyperspy .signals .image import Image
3120- s = Image (np .zeros (self .axes_manager .navigation_shape ),
3120+ s = Image (np .zeros (self .axes_manager ._navigation_shape_in_array ),
31213121 axes = self .axes_manager ._get_navigation_axes_dicts ())
31223122 else :
3123- s = Signal (np .zeros (self .axes_manager .navigation_shape ),
3123+ s = Signal (np .zeros (self .axes_manager ._navigation_shape_in_array ),
31243124 axes = self .axes_manager ._get_navigation_axes_dicts ())
31253125 return s
31263126
@@ -3133,7 +3133,7 @@ def next(self):
31333133 return self .get_current_signal ()
31343134
31353135 def __len__ (self ):
3136- return self .axes_manager .signal_shape [0 ]
3136+ return self .axes_manager .signal_shape [- 1 ]
31373137
31383138# Implement binary operators
31393139for name in (
0 commit comments