[NumPy-Tickets] [NumPy] #1748: astype('str') behavior is different in 1.6.0 vs 1.5.1
NumPy Trac
numpy-tickets@scipy....
Mon Feb 21 15:00:59 CST 2011
#1748: astype('str') behavior is different in 1.6.0 vs 1.5.1
----------------------+-----------------------------------------------------
Reporter: jseabold | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 2.0.0
Component: Other | Version: devel
Keywords: |
----------------------+-----------------------------------------------------
{{{
>>> import numpy as np
>>> np.__version__
'1.6.0.dev-c50af53'
>>> tmp_arr = np.array([['black'],['white'],['other']])
>>> tmp_arr.astype('str')
array([['b'],
['w'],
['o']],
dtype='|S1')
}}}
The old behavior
{{{
>>> import numpy as np
>>> np.__version__
'1.5.1'
>>> tmp_arr = np.array([['black'],['white'],['other']])
>>> tmp_arr.astype('str')
array([['black'],
['white'],
['other']],
dtype='|S5')
}}}
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1748>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list