Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With latest numpy update, generates an error on initialization #53

Open
rabinnh opened this issue Nov 1, 2020 · 7 comments
Open

With latest numpy update, generates an error on initialization #53

rabinnh opened this issue Nov 1, 2020 · 7 comments

Comments

@rabinnh
Copy link

rabinnh commented Nov 1, 2020

Using numpy 1.19.2 (I don't believe this occurred with 1.17.*), tzwhere 3.0.3, on initialization get the following error:

/usr/local/lib/python3.8/dist-packages/numpy/core/_asarray.py:83: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
return array(a, dtype, copy=False, order=order)

This obviously happens on the "WRAP(polys)" calls on lines 62 and 65.

If I comment out the "import numpy" section and declare WRAP and COLLECTION_TYPE as tuples, then quite obviously this error goes away.

@Arti3DPlayer
Copy link

+1

@oscgonfer
Copy link

Maybe as simple as this? #58

@John2013
Copy link

John2013 commented Dec 29, 2022

ValueError on numpy==1.24.1

  File ".../venv/lib/python3.8/site-packages/tzwhere/tzwhere.py", line 62, in __init__
    self.timezoneNamesToPolygons[tzname] = WRAP(polys)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (1, 2) + inhomogeneous part.

@antoniogamizbadger
Copy link

Same thing here :(

@ostapkostyk
Copy link

ostapkostyk commented Jul 13, 2023

Same thing (tzwhere 3.0.3, numpy 3.24). When trying to downgrade numpy, it fails because it doesn't support Python 3.10 :(
Now I have to downgrade python and rebuild venv :(

@oscgonfer
Copy link

hi @ostapkostyk , check the #58
Maybe is possible for you to switch to other package?

@Michael-E-Rose
Copy link

If you're like me, and you're disappointed by a fundamental issue not being solve in three years, just use the alternative:

https://github.com/jannikmi/timezonefinder

Note: I'm not affiliated with timezonefinder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants