diff options
author | aleju <kontakt@ajung.name> | 2019-08-13 22:12:14 +0200 |
---|---|---|
committer | aleju <kontakt@ajung.name> | 2019-08-13 22:12:14 +0200 |
commit | 6e412490ce27ac6b528e49a44b7c1c5bf29622db (patch) | |
tree | 1c2b479afbf2ef2359c7ad73b96ee9dc25239e9e /numpy | |
parent | b9f9cbfde5defb6e350284ff91e9ee6605dbe53d (diff) | |
download | numpy-6e412490ce27ac6b528e49a44b7c1c5bf29622db.tar.gz |
MAINT: Improve error message dtype appearance
This changes the string conversion of an expected
dtype in an error message from e.g.
"<class 'numpy.float64'>" to "float64".
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/random/common.pyx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/random/common.pyx b/numpy/random/common.pyx index b2f24be7d..74cd5f033 100644 --- a/numpy/random/common.pyx +++ b/numpy/random/common.pyx @@ -227,7 +227,7 @@ cdef check_output(object out, object dtype, object size): raise ValueError('Supplied output array is not contiguous, writable or aligned.') if out_array.dtype != dtype: raise TypeError('Supplied output array has the wrong type. ' - 'Expected {0}, got {1}'.format(dtype, out_array.dtype)) + 'Expected {0}, got {1}'.format(np.dtype(dtype), out_array.dtype)) if size is not None: try: tup_size = tuple(size) |