summaryrefslogtreecommitdiff
path: root/doc/source/reference/ufuncs.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source/reference/ufuncs.rst')
-rw-r--r--doc/source/reference/ufuncs.rst56
1 files changed, 30 insertions, 26 deletions
diff --git a/doc/source/reference/ufuncs.rst b/doc/source/reference/ufuncs.rst
index 77269be58..dedbf2929 100644
--- a/doc/source/reference/ufuncs.rst
+++ b/doc/source/reference/ufuncs.rst
@@ -207,7 +207,7 @@ implemented by the question of when a data type can be cast "safely"
to another data type. The answer to this question can be determined in
Python with a function call: :func:`can_cast(fromtype, totype)
<can_cast>`. The Figure below shows the results of this call for
-the 21 internally supported types on the author's 32-bit system. You
+the 24 internally supported types on the author's 64-bit system. You
can generate this table for your system with the code given in the Figure.
.. admonition:: Figure
@@ -224,34 +224,38 @@ can generate this table for your system with the code given in the Figure.
... print int(np.can_cast(row, col)),
... print
>>> print_table(np.typecodes['All'])
- X ? b h i l q p B H I L Q P f d g F D G S U V O
- ? 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
- b 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1
- h 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1
- i 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1
- l 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1
- q 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1
- p 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1
- B 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
- H 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
- I 0 0 0 0 0 1 0 0 0 1 1 1 1 0 1 1 0 1 1 1 1 1 1
- L 0 0 0 0 0 1 0 0 0 1 1 1 1 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
+
You should note that, while included in the table for completeness,
the 'S', 'U', and 'V' types cannot be operated on by ufuncs. Also,
-note that on a 64-bit system the integer types may have different
+note that on a 32-bit system the integer types may have different
sizes, resulting in a slightly altered table.
Mixed scalar-array operations use a different set of casting rules