Skip to content

Conversation

@gliptak
Copy link
Contributor

@gliptak gliptak commented Apr 9, 2016

@gliptak
Copy link
Contributor Author

gliptak commented Apr 9, 2016

This build failed https://travis-ci.org/pydata/pandas/jobs/121843938 likely because of the Scipy version.

axis was added to Akima1DInterpolator at 0.17.0 as per scipy/scipy@b0395b4

Is there a minimum version of Scipy for pandas? What would be a good way to handle lower versions?

Thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls have an expected case and use assert_series_equal

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added assert

@jreback jreback added Enhancement Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels Apr 9, 2016
@jreback
Copy link
Contributor

jreback commented Apr 9, 2016

you can you call this in a try: except to handle the scipy signature differences. (then if it doesn't work in the excpet, raise again). we don't have a min version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so need a test for this. on the 2.7_LOCALE build we install a really old scipy. We may need to install a somewhat newer one on another build to explicity test for this. When did this Akima1DInterpolate appear in scipy? and seems the axis parm was added in 0.17.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.14.0 (as per scipy/scipy@a0a3b38) I implemented a different check.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok the 3.4 build has scipy==0.14.0 installed so pls verify that the test works corretctly (IOW it is NOT skipped, but passes).

remove scipy from ci/requirements-3.5_OSX. Make sure that you DO see some skips. I don't think we were testing having NO scipy.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok , just remove scipy from ci/requirements-3.5_OSX and I think will be good to go.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from ci/requirements-3.5_OSX.run ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep (we are including a version of scipy on EVERY build, so need to take it from one)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@gliptak
Copy link
Contributor Author

gliptak commented Apr 9, 2016

The two test failures seem to be unrelated.

1 similar comment
@gliptak
Copy link
Contributor Author

gliptak commented Apr 10, 2016

The two test failures seem to be unrelated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change this (and the pchip one to something like):

if method == 'akima':
    alt_methods['akima'] = _akima_interpolate

Move to _akima_interpolate

    from scipy.interpolate import Akima1DInterpolator  # noqa

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@jreback
Copy link
Contributor

jreback commented Apr 10, 2016

pls add a whatsnew as well

@gliptak
Copy link
Contributor Author

gliptak commented Apr 10, 2016

Added whatsnew

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this is fine

@jreback
Copy link
Contributor

jreback commented Apr 10, 2016

pls squash

@jreback
Copy link
Contributor

jreback commented Apr 10, 2016

add a small note when to use this in : http://pandas-docs.github.io/pandas-docs-travis/missing_data.html#interpolation (you might want to break up that section a bit and make it into a table)

@jreback
Copy link
Contributor

jreback commented Apr 10, 2016

add to the doc-string for .interpolate with a versionadded tag

@gliptak
Copy link
Contributor Author

gliptak commented Apr 10, 2016

Added notes and versionadded tag

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no this needs to be updated in pandas.core.generic.NDFrame.interpolate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved section.

@gliptak
Copy link
Contributor Author

gliptak commented Apr 10, 2016

Updated per comments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@jreback jreback added this to the 0.18.1 milestone Apr 10, 2016
@jreback
Copy link
Contributor

jreback commented Apr 10, 2016

ok, looks good. ping when green (and pls verify that tests are skipped as appropriate)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need two spaces here at the beginning of this line, so the start of the text is aligned with the start of the text in the previous line ('If ...')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'support for 'akima'' should go on the next line I think. See the sphinx docs: http://www.sphinx-doc.org/en/stable/markup/para.html#directive-versionadded for an example. And then maybe change the text to something like "Added support for the 'akima' method"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

@jorisvandenbossche
Copy link
Member

@gliptak I just added some more doc comments, looks very good for the rest!

@gliptak
Copy link
Contributor Author

gliptak commented Apr 11, 2016

@jreback Build is green. Tests skipped https://s3.amazonaws.com/archive.travis-ci.org/jobs/122101334/log.txt

#268 pandas.tests.test_generic.TestSeries.test_interpolate_akima: no scipy.stats module
#269 pandas.tests.test_generic.TestSeries.test_interpolate_corners: no scipy.stats module
#270 pandas.tests.test_generic.TestSeries.test_interpolate_pchip: no scipy.stats module

I also opened #12856 (consistently fails the same way)

@jreback jreback closed this in 1c8816f Apr 11, 2016
@jreback
Copy link
Contributor

jreback commented Apr 11, 2016

@gliptak thanks!

pls review the built docs for accuracy (and good looking ness) and issue a follow up if necessary. (prob will take a few hours before they are built)

@gliptak
Copy link
Contributor Author

gliptak commented Apr 11, 2016

@jreback @jorisvandenbossche Thank you for guiding this through

@gliptak
Copy link
Contributor Author

gliptak commented Apr 11, 2016

Docs updated good.

@gliptak gliptak deleted the akima branch April 12, 2016 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Akima Interpolation to Pandas

3 participants