[NumPy-Tickets] [NumPy] #2130: array() with subok=True broken with subclass in nested sequence
NumPy Trac
numpy-tickets@scipy....
Thu May 10 22:06:33 CDT 2012
#2130: array() with subok=True broken with subclass in nested sequence
------------------------+---------------------------------------------------
Reporter: rmay | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.core | Version: devel
Keywords: |
------------------------+---------------------------------------------------
Comment(by rmay):
(Adding example with sane formatting.)
{{{
# The following works fine:
import numpy as np
a = np.ma.array([1,2,3])
print a
# masked_array(data = [1 2 3],
# mask = False,
# fill_value = 999999)
print np.array(a, subok=True) #Works
# masked_array(data = [1 2 3],
# mask = False, # fill_value = 999999)
print np.array([a], subok=True) # Broken
#array([[1, 2, 3]])
}}}
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/2130#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list