23.07.2013 17:51, Nathaniel Smith kirjoitti: [clip: conjcomplex dtype] > Because this latter cast is safe, all the existing ufuncs would > automatically work fine on conjcomplex arrays. But we could also > define conjcomplex-specific ufunc loops for cases like dot() where a > more efficient implementation is possible (using the above-mentioned > BLAS flags). > > Don't know if we want to actually do this, but it's doable.
There's somewhat a lot of 3rd party code that doesn't do automatic casting (e.g. all of Cython code interfacing with Numpy, C extensions, f2py I think), but rather fails for incompatible input dtypes. Having arrays with a new complex dtype around would require changes in this sort of code. In this sense having an iterator of some sort with an __array__ attribute would work. However, an iterator doesn't support (without a lot of work) the various ndarray attributes which would be confusing. -- Pauli Virtanen _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion