(self)
return self._array
Load array if it doesn't exist or just return it.
Load array if it doesn't exist or just return it.
Load array if it doesn t exist or just return it .
def array(self):
        """Load array if it doesn't exist or just return it."""
        if not self.is_loaded:
            self._array = self._load()
        
        #If the resolution was somehow created wrongly, then set a new one
        loaded_resolution = tuple(map(int, self._array.shape[::-1]))
        if self._resolution is not None and loaded_resolution != self._resolution:
            self._array = array(self._resolution, create=True, dtype=self._array.dtype)

        return self._array
def array ( self ) : if not self . is_loaded : self . _array = self . _load ( ) #If the resolution was somehow created wrongly, then set a new one loaded_resolution = tuple ( map ( int , self . _array . shape [ : : - 1 ] ) ) if self . _resolution is not None and loaded_resolution != self . _resolution : self . _array = array ( self . _resolution , create = True , dtype = self . _array . dtype ) return self . _array