#3216: E1101 false positive with numarray.randint [resolved]
#3216 - latest update on 2008/10/01, created on 2006/12/05 by Sylvain Thenault
| priority | normal |
| type | bug |
| load | 0.250 |
| load left | 0.000 |
Daniel Drake reported:
import numarray as na
import numarray.random_array as nar
im16 = nar.randint(0, 256, 300).astype(na.UInt8)
The above program causes pylint to complain:
E1101: 3: Instance of 'int' has no 'astype' member
This is with numarray-1.5.2. The randint function returns either a
numarray or an int. In this context it will only return a numarray
so .astype() is valid.
Syt: hard to fix... A possible solution might be to:
* issue E1101 when the searched member is not found on every infered value
* issue another warning when the searched member is not found on some infered value but found on another (or don't issue anything in this case?)
The best solution would be to be able to understand the flow according to given argument value, but we're still far away from that...
|
| |
Workflow history
| validation pending | resolved | | 2007/03/07 | sthenault |
| open | validation pending | much better astng inference is still not resolving this particular inference pb but at least in such case you get a specific E1003 message as suggested
| 2007/02/19 | sthenault |