Tom Denniston wrote: > I would think one would want to throw an error when the data has > inconsistent dimensions.
But it doesn't have inconsistent dimensions - they are perfectly consistent with a (2,) array of objects. How is the code to know what you intended? With numeric types, it is unambiguous to march down through the sequences until you get a number. As a sequence is an object, there no way to unambiguously do this automatically. Perhaps the way to solve this is for the array constructor to take a "shape" or "rank" argument, so you could specify what you intend. But that's really just syntactic sugar to avoid for calling numpy.empty() first. Perhaps a numpy.object_array() constructor would be useful, although as I think about it, even specifying a shape or rank would not be unambiguous! This is a useful discussion. If we ever get a nd-array into the standard lib, I suspect that object arrays will get heavy use -- better to clean up the semantics now. Perhaps a Wiki page on building object arrays is called for. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion