> I liked MvL's __index__ method. I understand your hesitancy. It's > pretty tough exploring new features side-by-side the "version > fatigue" thread :) Yes. > >What's your use case? Why do you need this? > This might settle it :) Numeric/numarray arrays are sometimes used in > reduction operations (e.g. max) which eliminate one dimension. Sometimes > the result is a zero dimensional array, which is currently converted to > a Python scalar in both Numeric and numarray. The conversion to scalar > enables integer zero dimensional results to be used as indices, but > causes other problems since any auxilliary information in the array > (e.g. type = Int8) is lost. Adding some form of implicit conversion to > index value might permit us to retain zero dimensional objects as arrays. But when you're indexing Numeric/numarray arrays, you have full control over the interpretation of indices, so you can do this yourself. Do you really need to be able to index Python sequences (lists, tuples) with your 0-dimensional arrays? Could you live with having to call int() in those cases? --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4