Open numpy-gitbot opened 12 years ago
atmention:dopplershift wrote on 2012-05-11
(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]])
Original ticket http://projects.scipy.org/numpy/ticket/2130 on 2012-05-11 by atmention:dopplershift, assigned to unknown.
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)
masked_array(data = [1 2 3],
mask = False,
fill_value = 999999)
This is broken
print np.array([a], subok=True)
array([[1, 2, 3]])