From 0fe4df2726d76b2093aa5d26f0ca839ef47c3770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Tue, 1 Jan 2013 10:13:03 +0100 Subject: Add short note in doc string about dtype for non-numbers --- numpy/core/numeric.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'numpy/core/numeric.py') diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 09797b990..5a38e5872 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -235,6 +235,9 @@ def nans(shape, dtype=None, order='C'): """ Return a new array of given shape and type, filled with nans. + Note that only floating point numbers can represent non-numers as defined + in IEEE 754-1985. + Please refer to the documentation for `zeros` for further details. See Also @@ -260,6 +263,9 @@ def nans_like(a, dtype=None, order='K', subok=True): """ Return an array of nans with the same shape and type as a given array. + Note that only floating point numbers can represent non-numers as defined + in IEEE 754-1985. + With default parameters, is equivalent to ``a.copy().fill(np.nan)``. Parameters @@ -303,6 +309,9 @@ def infs(shape, dtype=None, order='C'): """ Return a new array of given shape and type, filled with infs. + Note that only floating point numbers can represent non-numers as defined + in IEEE 754-1985. + Please refer to the documentation for `zeros` for further details. See Also @@ -328,6 +337,9 @@ def infs_like(a, dtype=None, order='K', subok=True): """ Return an array of infs with the same shape and type as a given array. + Note that only floating point numbers can represent non-numers as defined + in IEEE 754-1985. + With default parameters, is equivalent to ``a.copy().fill(np.inf)``. Parameters -- cgit v1.2.1