From 8c0bb22cb5b0979defe11e4befd20f7b79f5da08 Mon Sep 17 00:00:00 2001 From: Isaac Virshup Date: Tue, 27 Aug 2019 12:32:52 +1000 Subject: DOC: Fixed dtype docs for var, nanvar. Docs incorrectly stated that the default output dtype was float32 when input array is of an integer dtype. However: ```python np.var(np.random.randint(0, 100, 1000)).dtype == np.dtype("f8") ``` --- numpy/core/fromnumeric.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/fromnumeric.py') diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 08f17aae4..c37dbc5df 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -3410,7 +3410,7 @@ def var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=np._NoValue): instead of a single axis or all the axes as before. dtype : data-type, optional Type to use in computing the variance. For arrays of integer type - the default is `float32`; for arrays of float types it is the same as + the default is `float64`; for arrays of float types it is the same as the array type. out : ndarray, optional Alternate output array in which to place the result. It must have -- cgit v1.2.1