fatiando / verde

Processing and gridding spatial data, machine-learning style
https://www.fatiando.org/verde
BSD 3-Clause "New" or "Revised" License
603 stars 72 forks source link

Fix pandas warnings about .ravel() #449

Closed leouieda closed 6 months ago

leouieda commented 7 months ago

Pandas was issuing FutureWarnings about calling Series.ravel, which could be fixed by calling np.ravel() instead, and a keyword argument of the groupby .apply changing the default to not include the index in the calculations (which is the right thing to do).

leouieda commented 7 months ago

@santisoler the other warning about aggregate I couldn't find a way to fix. I think we'll just have to live with it until Pandas makes a new release. Or we pass strings to BlockReduce instead of functions but I'm not a huge fan.

leouieda commented 7 months ago

So the pandas warning about apply won't work on older pandas...

I think we should leave it as is and let pandas change their default when they want. It's not like we're doing something completely wrong since the tests pass with or without the new argument.,