Skip to content

Commit

Permalink
DOC: Explain the new exception behavior of np.dot when its types ca…
Browse files Browse the repository at this point in the history
…nnot be cast to a common type.
  • Loading branch information
jakirkham committed Jan 15, 2016
1 parent 5fc07a2 commit ef09a84
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/release/1.11.0-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ 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
============
Expand Down Expand Up @@ -174,6 +181,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
============

Expand Down

0 comments on commit ef09a84

Please sign in to comment.