diff options
Diffstat (limited to 'doc/release')
-rw-r--r-- | doc/release/1.11.0-notes.rst | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/doc/release/1.11.0-notes.rst b/doc/release/1.11.0-notes.rst index 7f78e387a..16af02440 100644 --- a/doc/release/1.11.0-notes.rst +++ b/doc/release/1.11.0-notes.rst @@ -60,11 +60,18 @@ to preserve struct layout). These were never used for anything, so it's unlikely that any third-party code is using them either, but we mention it here for completeness. +*np.dot* now raises ``TypeError`` instead of ``ValueError`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This behaviour mimics that of other functions such as ``np.inner``. If the two +arguments cannot be cast to a common type, it could have raised a ``TypeError`` +or ``ValueError`` depending on their order. Now, ``np.dot`` will now always +raise a ``TypeError``. + New Features ============ -* `np.histogram` now provides plugin estimators for automatically +* ``np.histogram`` now provides plugin estimators for automatically estimating the optimal number of bins. Passing one of ['auto', 'fd', 'scott', 'rice', 'sturges'] as the argument to 'bins' results in the corresponding estimator being used. @@ -98,8 +105,8 @@ New Features - np.int_ (long), np.intp The specification is by precision rather than by C type. Hence, on some - platforms np.int64 may be a `long` instead of `long long` even if the - specified dtype is `long long` because the two may have the same + platforms np.int64 may be a ``long`` instead of ``long long`` even if the + specified dtype is ``long long`` because the two may have the same precision. The resulting type depends on which C type numpy uses for the given precision. The byteorder specification is also ignored, the generated arrays are always in native byte order. @@ -175,6 +182,13 @@ This behaviour mimics that of other functions such as ``np.diagonal`` and ensures, e.g., that for masked arrays ``np.trace(ma)`` and ``ma.trace()`` give the same result. +*np.dot* now raises ``TypeError`` instead of ``ValueError`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This behaviour mimics that of other functions such as ``np.inner``. If the two +arguments cannot be cast to a common type, it could have raised a ``TypeError`` +or ``ValueError`` depending on their order. Now, ``np.dot`` will now always +raise a ``TypeError``. + Deprecations ============ @@ -188,7 +202,7 @@ more such dual contiguous arrays and breaks some existing code as a result. Note that this also affects changing the dtype by assigning to the dtype attribute of an array. The aim of this deprecation is to restrict views to c_contiguous arrays at some future time. A work around that is backward -compatible is to use `a.T.view(...).T` instead. A parameter will also be +compatible is to use ``a.T.view(...).T`` instead. A parameter will also be added to the view method to explicitly ask for Fortran order views, but that will not be backward compatible. |