#NEWLINE# def __init__( self , shape , dtype = None , np_data = None , array_data = None , array_owner = None ) : #NEWLINE# #INDENT# shape = helpers . require_iterable ( shape ) #NEWLINE# if ( shape == ( ) ) : #NEWLINE# #INDENT# shape = ( 1 , ) #NEWLINE# #UNINDENT# self . shape = shape #NEWLINE# self . transposed = False #NEWLINE# self . isbool = False #NEWLINE# if ( dtype is None ) : #NEWLINE# #INDENT# if ( np_data is None ) : #NEWLINE# #INDENT# dtype = np . dtype ( base . float_ ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# dtype = np_data . dtype #NEWLINE# #UNINDENT# #UNINDENT# if ( dtype == np . dtype ( 'float64' ) ) : #NEWLINE# #INDENT# dtype = np . dtype ( base . float_ ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( dtype == np . dtype ( 'int64' ) ) : #NEWLINE# #INDENT# dtype = np . dtype ( base . int_ ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( dtype == np . dtype ( 'bool' ) ) : #NEWLINE# #INDENT# dtype = np . dtype ( base . bool_ ) #NEWLINE# self . isbool = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# dtype = np . dtype ( dtype ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( np_data is not None ) : #NEWLINE# #INDENT# np_data = np . require ( np_data , dtype = dtype , requirements = 'C' ) #NEWLINE# #UNINDENT# if ( array_data is None ) : #NEWLINE# #INDENT# self . _data = ArrayData ( self . size , dtype , np_data ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _data = array_data