FutureWarning w/ SpatialDataFrame

943
5
08-12-2021 04:30 PM
by Anonymous User
Not applicable

Hello All,

I'm getting the following FutureWarning when using the SpatialDataFrame, e.g.:

 

sdf.query('PI == "NA"')

 

 

/.../python3.7/site-packages/arcgis/features/geo/_array.py:316: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
return GeoArray(self.data[idx])

 

I can suppress the warning with:

import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)

 but just wondered if it was anything to be concerned about.  I'm using version 1.9.0.

Thanks!

 

0 Kudos
5 Replies
JoshuaBixby
MVP Esteemed Contributor

If you are writing new code or modifying existing code, you should take the deprecation warning to heart and stop using the deprecated syntax.  Why would you want to write code today that may stop working in a future release when the vendor is telling you it will break eventually if you don't change your code.

by Anonymous User
Not applicable

Thanks for your reply Joshua.  In this case, the warning is coming from the Esri ArcGIS API for Python and my question is really for the maintainers of that software. 

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Ah, I get the situation now.  Yes, it would be a very very good idea for the ArcGIS API fro Python team to update their code.  Cross your fingers but don't hold your breadth. 

0 Kudos
HenryHolsten
New Contributor

oh you silly person do you think everyone does this because they are dumb? Sometimes its the only way something runs you elitist

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

New user as of this past Saturday, and your first comment on EC is to call someone names?  I encourage you to read Community Guidelines - Esri Community.

0 Kudos