From 32582d819a5843a4189bfe24f48d5b7dc21edd8e Mon Sep 17 00:00:00 2001 From: Ganesh Kathiresan Date: Sat, 29 May 2021 23:42:07 +0530 Subject: [PATCH] DOC: Added doc for `TypeError` thrown during floor divide (#19135) --- doc/release/upcoming_changes/19135.change.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/release/upcoming_changes/19135.change.rst diff --git a/doc/release/upcoming_changes/19135.change.rst b/doc/release/upcoming_changes/19135.change.rst new file mode 100644 index 000000000000..12cad430cf9c --- /dev/null +++ b/doc/release/upcoming_changes/19135.change.rst @@ -0,0 +1,10 @@ +Removed floor division support for complex types +------------------------------------------------ + +Floor division of complex types will now result in a `TypeError` + +.. code-block:: ini + + >>> a = np.arange(10) + 1j* np.arange(10) + >>> a // 1 + TypeError: ufunc 'floor_divide' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''