Hi All, This is apropos gh-5634 <https://github.com/numpy/numpy/pull/5634>, a PR adding a precision keyword to asarray and asanyarray. The PR description is
The precision keyword differs from the current dtype keyword in the > following way. > > - It specifies a minimum precision. If the precision of the input is > greater than the specified precision, the input precision is preserved. > - Complex types are preserved. A specifies floating precision applies > to the dtype of the real and complex parts separately. > > For example, both complex128 and float64 dtypes have the > same precision and an array of dtype float64 will be unchanged if the > specified precision is float32. > > Ideally the precision keyword would be pushed down into the array > constructor so that the resulting dtype could be determined before the > array is constructed, but that would require adding new functions as the > current constructors are part of the API and cannot have their > signatures changed. > The name of the keyword is open to discussion, as well as its acceptable values. And of course, anything else that might come to mind ;) Thoughts? Chuck
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion