Exemple #1
0
 def flag_ones(self, shape, **kw):
     """
 Shortcut for default numpy ones method using this numpy flag dtype and order
 """
     kw['dtype'] = self.flag_dtype
     setDefaultKey(kw, 'order', self.order)
     return np.ones(shape, **kw)
Exemple #2
0
 def int_zeros(self, shape, **kw):
     """
 Shortcut for default numpy zeros method using this numpy integer dtype and order
 """
     kw['dtype'] = self.int_dtype
     setDefaultKey(kw, 'order', self.order)
     return np.zeros(shape, **kw)
Exemple #3
0
 def scounter_ones(self, shape, **kw):
     """
 Shortcut for default numpy ones method using this numpy short counter dtype and order
 """
     kw['dtype'] = self.scounter_dtype
     setDefaultKey(kw, 'order', self.order)
     return np.ones(shape, **kw)
Exemple #4
0
 def fp_zeros(self, shape, **kw):
     """
 Shortcut for default numpy zeros method using this numpy floating point and dtype and order
 """
     kw['dtype'] = self.fp_dtype
     setDefaultKey(kw, 'order', self.order)
     return np.zeros(shape, **kw)
Exemple #5
0
 def flag_array(self, obj, **kw):
     """
 Shortcut for default numpy array method using this numpy flag dtype and order
 """
     kw['dtype'] = self.flag_dtype
     setDefaultKey(kw, 'order', self.order)
     return np.array(obj, **kw)
Exemple #6
0
 def scounter_array(self, obj, **kw):
     """
 Shortcut for default numpy array method using this numpy short counter dtype and order
 """
     kw['dtype'] = self.scounter_dtype
     setDefaultKey(kw, 'order', self.order)
     return np.array(obj, **kw)
Exemple #7
0
 def array(self, obj, **kw):
     """
 Shortcut for this default floating point array, but type can be changed.
 """
     setDefaultKey(kw, 'dtype', self.fp_dtype)
     setDefaultKey(kw, 'order', self.order)
     return np.array(obj, **kw)
Exemple #8
0
 def ones(self, shape, **kw):
     """
 Shortcut for default numpy ones method using this numpy floating point dtype and order.
 dtype can be changed.
 """
     setDefaultKey(kw, 'dtype', self.fp_dtype)
     setDefaultKey(kw, 'order', self.order)
     return np.ones(shape, **kw)