-
Notifications
You must be signed in to change notification settings - Fork 46
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
Update/cleanup/standardize notebooks #288
Conversation
It also cleans up and adds the two notebooks to the docs that @TimMcCauley contributed (we forgot to add those in previously). Thanks again, @TimMcCauley! |
Happy to! If you have further ideas, I'd be happy to whip something 🆙 |
@TimMcCauley I am happy to review anything you'd be willing to contribute! |
@gegen07 Any chance of getting a review of this PR for merge? Not trying to rush if you don't have the time. Also, there are *There are minor functionality changes in |
I'll review it tomorrow. Sorry for delay, I've been quite busy this week. |
No problem! Thanks so much! |
Addressing #289 within this PR, as well (@martinfleis) |
OK, @martinfleis I've found something for you on the Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:41:54) [Clang 13.0.1 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.5.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import numpy
...: import shapely
...: from shapely.geometry import Point
...: shapely.__version__
Out[1]: '2.0b1'
In [2]: x, y = numpy.array([1]), numpy.array([1])
In [3]: x, y
Out[3]: (array([1]), array([1]))
In [4]: Point(x, y)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [4], line 1
----> 1 Point(x, y)
File ~/miniconda3/envs/py310_shapely_20b1/lib/python3.10/site-packages/shapely/geometry/point.py:77, in Point.__new__(self, *args)
74 geom = shapely.points(np.array(args))
76 if not isinstance(geom, Point):
---> 77 raise ValueError("Invalid values passed to Point constructor")
78 return geom
ValueError: Invalid values passed to Point constructor Two singular value |
@jGaboardi good catch! That'll be a regression on shapely side. I'll report it there. |
@gegen07 We can ignore the failing |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jGaboardi LGTM!
Just one comment that I didn't get!
This is a relatively large PR that touches all notebooks. It cleans up, modernizes, and standardizes both notebook sets,
region
andlocate
, but mainly focuses on highlighting and consolidating the work by @gegen07 from GSoC 2021 and @erinrolson from GSoC 2022 (awesome work from both!)spopt
against theshapely==2.0b1
#289Also overhauls
spopt.locate.utils.simulate_geo_points()
for robustness and adds tests.