summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorMark Wiebe <mwwiebe@gmail.com>2011-04-13 15:04:17 -0700
committerMark Wiebe <mwwiebe@gmail.com>2011-04-22 14:14:05 -0700
commitbc03f06626a3d2fcef9874128b3ca11b14716b18 (patch)
tree25572244b4e176eb13c246013c250cbd35265dc4 /numpy
parent9e817bb1ff751c8bac6e9999dd89672a7af8c223 (diff)
downloadnumpy-bc03f06626a3d2fcef9874128b3ca11b14716b18.tar.gz
DOC: Document the new keyword arguments for ufuncs
Diffstat (limited to 'numpy')
-rw-r--r--numpy/add_newdocs.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index ce2d4be8f..92b260754 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -1552,8 +1552,15 @@ add_newdoc('numpy.core.multiarray', 'can_cast',
Data type, scalar, or array to cast from.
totype : dtype or dtype specifier
Data type to cast to.
- casting : casting rule
- May be any of 'no', 'equiv', 'safe', 'same_kind', or 'unsafe'.
+ casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
+ Controls what kind of data casting may occur.
+
+ * 'no' means the data types should not be cast at all.
+ * 'equiv' means only byte-order changes are allowed.
+ * 'safe' means only casts which can preserve values are allowed.
+ * 'same_kind' means only safe casts or casts within a kind,
+ like float64 to float32, are allowed.
+ * 'unsafe' means any data conversions may be done.
Returns
-------