[Numpy-tickets] [NumPy] #335: '()type' not allowed in creating dtypes
NumPy
numpy-tickets at scipy.net
Fri Oct 13 10:13:09 CDT 2006
#335: '()type' not allowed in creating dtypes
--------------------+-------------------------------------------------------
Reporter: faltet | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: Other | Version: devel
Severity: normal | Resolution:
Keywords: |
--------------------+-------------------------------------------------------
Comment (by faltet):
And here it is as patch:
{{{
--- numpy/core/src/multiarraymodule.c (revision 3322)
+++ numpy/core/src/multiarraymodule.c (working copy)
@@ -4691,11 +4691,19 @@
{
int i;
+ /* Check for ints */
if ((type[0] >= '0' && type[0] <= '9') ||
((len > 1) && (type[0] == '>' || type[0] == '<' || \
type[0] == '|' || type[0] == '=') && \
(type[1] >= '0' && type[1] <= '9')))
return 1;
+ /* Check for empty tuple */
+ if ((type[0] == '(' && type[1] == ')') ||
+ ((len > 2) && (type[0] == '>' || type[0] == '<' || \
+ type[0] == '|' || type[0] == '=') && \
+ (type[1] == '(' && type[2] <= ')')))
+ return 1;
+ /* Check for commas */
for (i=1;i<len;i++)
if (type[i] == ',') return 1;
}}}
It seems that it had nothing to do with r3309. Sorry for the red herring.
Regards
--
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/335#comment:1>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list