Skip to content

np.fix crashes with pandas time series #1721

Closed
@tschm

Description

@tschm
    import numpy as np
    import pandas

    x = pandas.TimeSeries(data = np.array([-0.54548407,  2.81105692, np.nan, -1.61954275, 1.3670269,  -0.73211055, -0.22832786,  0.06384124, -1.7113508,  -2.42429978]), index = np.arange(0,10))

print np.fix(x)

crashes with:

  File "C:\Python27\lib\site-packages\numpy\lib\ufunclike.py", line 48, in fix
    y[...] = nx.where(x >= 0, y1, y2)
  File "C:\Python27\lib\site-packages\pandas\core\series.py", line 540, in __setitem__
    raise KeyError('%s not in this series!' % str(key))
KeyError: 'Ellipsis not in this series!'

I assume this should work?
Thomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions