From 6e412490ce27ac6b528e49a44b7c1c5bf29622db Mon Sep 17 00:00:00 2001 From: aleju Date: Tue, 13 Aug 2019 22:12:14 +0200 Subject: MAINT: Improve error message dtype appearance This changes the string conversion of an expected dtype in an error message from e.g. "" to "float64". --- numpy/random/common.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy') 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) -- cgit v1.2.1