diff options
author | cookedm <cookedm@localhost> | 2006-02-24 05:47:33 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2006-02-24 05:47:33 +0000 |
commit | e3a1d502e5d08a755dd1d91eb74341c7617adbdd (patch) | |
tree | 2d0d140f593dc4fe1c90caa16c96c9e1e3d20533 /numpy/lib/utils.py | |
parent | ee7b258d90768a6ec1e7a697e3b7b5067eda00e4 (diff) | |
download | numpy-e3a1d502e5d08a755dd1d91eb74341c7617adbdd.tar.gz |
Special-case PyArray_FromAny to handle Python scalars.
bool, int, long, float, and complex are tested for early, and converted using
PyArray_FromScalar before going to the general code. Before, tests for
attributes like __array__ would be done first.
This does have the side effect that if you have a subclass of float, say, that
defines the array interface then that will not be used. I can't conceive
of a use for that though.
Diffstat (limited to 'numpy/lib/utils.py')
0 files changed, 0 insertions, 0 deletions