GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — Improve construction when inferring sub-array dtype (a.k.a. array subdtype) by eriknw · Pull Request #381 · python-graphblas/python-graphblas Conversation
Member
This gives us an easy, consistent way to infer sub-array dtypes upon when constructing objects. Also, this handles more cases (I apparently missed some!). See tests for examples.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
Coverage: 99.496% (+0.09%) from 99.408% when pulling 4c6c925 on eriknw:better_subarray_support into e7a9a31 on python-graphblas:main. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # If we know the dtype, then using `np.fromiter` is much faster | ||
| dtype = lookup_dtype(dtype) | ||
| values = np.fromiter(iter_values, dtype.np_type) | ||
| if dtype.np_type.subdtype is not None and np.__version__[:5] in {"1.21.", "1.22."}: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think this is the first time we actually use the version of a dependency. This way is pretty low-tech, and hopefully fine. If we need to do more version-dependent behavior, we'll probably want to use a helper utility such as packaging.version.parse.
Also, CI testing of dependency versions FTW!
We can drop 1.21 in June, and 1.22 next January.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I need this for another PR (#382), merging. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.