2012/11/21 Conrad Lee <[email protected]>: > The strange thing is that idxs is of dtype "object". I thus can't use it in > the way I'd normally use it if it were an integer array. I can't do > idxs.ravel() to get a flat list of the indices. idxs.shape returns (1,), > which is awkward. If I run `idxs.astype("u8") I get an error (ValueError: > setting an array element with a sequence.). > > Is this behavior intended? Can it be improved? How can I convert the array > of dtype "object" into an integer array?
I would say this is a bug. dtype=object is annoying and unnecessary when the array contains integers. -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
