linkagescape / linkage-mapper

ArcGIS tools to automate mapping and prioritization of wildlife habitat corridors
https://circuitscape.org/linkagemapper/
GNU General Public License v3.0
37 stars 12 forks source link

Changed float data type syntax according to new version of numpy #146

Closed venkanna37 closed 2 years ago

venkanna37 commented 2 years ago

Converting distance data to NumPy array with dtype = ‘Float64’ is raising the error in ArcGIS Pro as Pro uses the latest version of Numpy. Replacing dtype = 'Float64' with dtype = np.float64 (new syntax) solved the issue and this syntax works well with the old version of NumPy in ArcGIS.

johngallo commented 2 years ago

Great work Venkanna! Thank you.

dkav commented 2 years ago

The issue that this pull request fixes is due to Numpy removing support for old numeric-style dtypes in version 1.20. Users would have only encountered the issue if they were running ArcGIS Pro 2.8, which ships with version 1.20.1 of Numpy. Earlier versions of ArcGIS Pro ship with older versions of Numpy and so the problem does not occur for these releases. The deprecation warning in Numpy 1.19.1 (ArcGIS Pro 2.7) for the type change is unfortunately not reported by Linkage Mapper.

As my comments indicate, ArcGIS Pro 2.7 was the version that I used in my testing. Caveat emptor!

johngallo commented 2 years ago

Thanks Darren! That makes more sense. I hear there are errors being thrown by Climate Linkage Mapper now, possibly caused by this change too. Venkanna is planning to try tackling them in a few hours.

On Thu, Jul 22, 2021 at 5:58 PM Darren Kavanagh @.***> wrote:

The issue that this pull request fixes is due Numpy removing support for old numeric-style dtypes https://github.com/numpy/numpy/pull/16554 in version 1.20. Users would have only encountered the issue if the were running ArcGIS Pro 2.8, which ships with version 1.20.1 of Numpy. Earlier versions of ArcGIS Pro ship with older versions of Numpy and so the problem does not occur for these releases. The deprecation warning in Numpy 1.19.1 (ArcGIS Pro 2.7) for the type change is unfortunately not reported by Linkage Mapper.

As my comments indicate, ArcGIS Pro 2.7 was the version that I used in my testing. Caveat emptor!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/linkagescape/linkage-mapper/pull/146#issuecomment-885332286, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7CJ2YQRZBA6JCLF52G2XTTZC5BPANCNFSM5AZZABSA .

venkanna37 commented 2 years ago

The issue that this pull request fixes is due to Numpy removing support for old numeric-style dtypes in version 1.20. Users would have only encountered the issue if they were running ArcGIS Pro 2.8, which ships with version 1.20.1 of Numpy. Earlier versions of ArcGIS Pro ship with older versions of Numpy and so the problem does not occur for these releases. The deprecation warning in Numpy 1.19.1 (ArcGIS Pro 2.7) for the type change is unfortunately not reported by Linkage Mapper.

As my comments indicate, ArcGIS Pro 2.7 was the version that I used in my testing. Caveat emptor!

Thank you Darren for the information. Yes, It was due to the updated Numpy version (1.20.1) in ArcGIS Pro 2.8.1.