diff options
Diffstat (limited to 'numpy/doc/structured_arrays.py')
-rw-r--r-- | numpy/doc/structured_arrays.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/numpy/doc/structured_arrays.py b/numpy/doc/structured_arrays.py index c0437dc07..1343d2adc 100644 --- a/numpy/doc/structured_arrays.py +++ b/numpy/doc/structured_arrays.py @@ -340,11 +340,8 @@ structured datatype has just a single field:: >>> nostruct = np.zeros(2, dtype='i4') >>> nostruct[:] = twofield Traceback (most recent call last): - File "<stdin>", line 1, in <module> - ValueError: Can't cast from structure to non-structure, except if the structure only has a single field. - >>> nostruct[:] = onefield - >>> nostruct - array([0, 0], dtype=int32) + ... + TypeError: Cannot cast scalar from dtype([('A', '<i4'), ('B', '<i4')]) to dtype('int32') according to the rule 'unsafe' Assignment from other Structured Arrays ``````````````````````````````````````` |