Re: [Numpy-discussion] Fast way to convert (nested) list to numpy object array?

2014-07-04 Thread Marc Hulsman
On 07/03/2014 02:44 PM, Sebastian Berg wrote: > True and true. I don't see a problem with fromiter being more general, > just someone has to sit down and add new error checks/cleanup stuff > for the object case. The assignment could probably also be optimized, > not sure how hard that is, I would e

Re: [Numpy-discussion] Fast way to convert (nested) list to numpy object array?

2014-07-03 Thread Marc Hulsman
On 07/03/2014 11:43 AM, Julian Taylor wrote: > On second though I guess adding a short circuit to the dimension > discovery on mismatching list length with object type should solve the > issue too. A bit more information on the use case would still be > useful, why do you need to use numpy arrays f

[Numpy-discussion] Fast way to convert (nested) list to numpy object array?

2014-07-03 Thread Marc Hulsman
Hello, In my application I use nested, someitmes variable length lists, e.g. [[1,2], [1,2,3], ...]. These can also become double nested, etc. up to arbitrary complexity. I like to use numpy indicing on the outer list, i.e. I want to create: array([[1, 2], [1, 2, 3]], dtype=object) However, becau