[Numpy-tickets] [NumPy] #736: Inconsistent integer conversion from strings

NumPy numpy-tickets@scipy....
Wed Apr 16 10:09:42 CDT 2008


#736: Inconsistent integer conversion from strings
--------------------+-------------------------------------------------------
 Reporter:  stefan  |        Owner:  oliphant
     Type:  defect  |       Status:  new     
 Priority:  normal  |    Milestone:  1.0.5   
Component:  Other   |      Version:  none    
 Severity:  normal  |   Resolution:          
 Keywords:          |  
--------------------+-------------------------------------------------------
Comment (by dhuard):

 Replying to [comment:3 charris]:
 I think this broke the timeseries scikit. On import, I get the following
 error:
 {{{
 /usr/local/lib64/python2.5/site-packages/scikits/timeseries/__init__.py in
 <module>()
      15 import tdates
      16 from tdates import *
 ---> 17 import tseries
      18 from tseries import *
      19 import trecords

 /usr/local/lib64/python2.5/site-packages/scikits/timeseries/tseries.py in
 <module>()
    1113                       hard_mask=hard_mask,)
    1114
 -> 1115 tsmasked = TimeSeries(masked,dates=DateArray(Date('D',1)))
    1116
    1117 #####
 --------------------------------------------------------------------------

 /usr/local/lib64/python2.5/site-packages/scikits/timeseries/tdates.pyc in
 __new__(cls, dates, freq, copy)
     179             _freq = check_freq(freq)
     180         # Get the dates ..........
 --> 181         _dates = np.array(dates, copy=copy, dtype=int_, subok=1)
     182         if _dates.ndim == 0:
     183             _dates.shape = (1,)

 TypeError: long() argument must be a string or a number, not
 'timeseries.Date'
 }}}

 But
 {{{
 int_(dates)
 1
 }}}
 Is it possible you added strict type checking ?

-- 
Ticket URL: <http://scipy.org/scipy/numpy/ticket/736#comment:5>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list