[Numpy-tickets] [NumPy] #508: astype modifies fortran-ordering

NumPy numpy-tickets@scipy....
Tue May 1 18:33:39 CDT 2007


#508: astype modifies fortran-ordering
------------------------+---------------------------------------------------
 Reporter:  stefan      |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  normal      |   Milestone:          
Component:  numpy.core  |     Version:  none    
 Severity:  normal      |    Keywords:          
------------------------+---------------------------------------------------
 {{{
 In [5]: z = N.array([[1,2],[3,4]],order='F').astype(N.float64)

 In [6]: z
 Out[6]:
 array([[ 1.,  2.],
        [ 3.,  4.]])

 In [7]: z.flags
 Out[7]:
   C_CONTIGUOUS : True
   F_CONTIGUOUS : False
   OWNDATA : True
   WRITEABLE : True
   ALIGNED : True
   UPDATEIFCOPY : False

 In [8]: x = N.array([[1,2],[3,4]],order='F')

 In [9]: x.flags
 Out[9]:
   C_CONTIGUOUS : False
   F_CONTIGUOUS : True
   OWNDATA : True
   WRITEABLE : True
   ALIGNED : True
   UPDATEIFCOPY : False

 In [10]: x.astype(N.float64).flags
 Out[10]:
   C_CONTIGUOUS : True
   F_CONTIGUOUS : False
   OWNDATA : True
   WRITEABLE : True
   ALIGNED : True
   UPDATEIFCOPY : False
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/508>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list