Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
numpy
GitHub Repository: numpy/numpy
Path: blob/main/doc/release/upcoming_changes/29301.deprecation.rst
1713 views
``align=`` must be passed as boolean to ``np.dtype()``
------------------------------------------------------
When creating a new ``dtype`` a ``VisibleDeprecationWarning`` will be
given if ``align=`` is not a boolean.
This is mainly to prevent accidentally passing a subarray align flag where it
has no effect, such as ``np.dtype("f8", 3)`` instead of ``np.dtype(("f8", 3))``.
We strongly suggest to always pass ``align=`` as a keyword argument.