[Numpy-tickets] [NumPy] #988: Concatenate with sequence that contains empty sequences.
NumPy
numpy-tickets@scipy....
Wed Jan 21 18:54:35 CST 2009
#988: Concatenate with sequence that contains empty sequences.
--------------------+-------------------------------------------------------
Reporter: kelson | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 1.3.0
Component: Other | Version: none
Severity: normal | Keywords:
--------------------+-------------------------------------------------------
Howdy,
After searching for this defect, perhaps nobody else has been bothered
by this behaviour, but has anybody else noticed:
{{{
concatenate ( [[1],[2],[3],[4]] ).dtype = int32
concatenate ( [[1],[2],[3],[]] ).dtype = int32
concatenate ( [[],[2],[3],[4]] ).dtype = float64
}}}
I have a lot of old-style Numeric stuff that likes to concatenate lists
of indices which then were used with take [which does not like floats]. So
below [in theory] I attach my attempt at a patch so that empty items in
the sequence are
not used to influence the common type that is used by
PyArray_ConvertToCommonType.
Maybe it is of some value, or maybe I didn't do this in a kosher manner
and
someone else has an idea of where things should be rethought for this
defect?
Cheerio.
--
Ticket URL: <http://scipy.org/scipy/numpy/ticket/988>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list