From d24db3430a6710d18f9f9e77c89ee442e9c0d631 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 16 Oct 2010 11:36:44 +0200 Subject: BUG: core: adjust ComplexWarning location frame up by one, so that the warning comes from the correct location (#1639) --- numpy/core/src/scalarmathmodule.c.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/src/scalarmathmodule.c.src') diff --git a/numpy/core/src/scalarmathmodule.c.src b/numpy/core/src/scalarmathmodule.c.src index 6261c4c73..6913f517d 100644 --- a/numpy/core/src/scalarmathmodule.c.src +++ b/numpy/core/src/scalarmathmodule.c.src @@ -990,7 +990,7 @@ emit_complexwarning() #if PY_VERSION_HEX >= 0x02050000 return PyErr_WarnEx(cls, "Casting complex values to real discards the imaginary " - "part", 0); + "part", 1); #else return PyErr_Warn(cls, "Casting complex values to real discards the imaginary " -- cgit v1.2.1