8000 ufunc 'create_collection' not supported for the input types · Issue #2098 · shapely/shapely · GitHub
[go: up one dir, main page]

Skip to content
ufunc 'create_collection' not supported for the input types #2098
@mwtoews

Description

@mwtoews

This is a recent issue identified using nightly numpy binary wheels with the main branch of shapely.

The error looks like this:

=========================== test session starts ============================
platform linux -- Python 3.10.12, pytest-8.2.2, pluggy-1.5.0
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/mtoews/src/shapely/shapely
configfile: setup.cfg
plugins: syrupy-4.6.1, anyio-4.4.0, dotenv-0.5.2, flaky-3.8.1, hypothesis-6.108.5, cov-5.0.0, xdist-3.6.1, benchmark-4.0.0
collected 9 items / 1 error                                                

================================== ERRORS ==================================
__________ ERROR collecting shapely/tests/geometry/test_coords.py __________
shapely/tests/geometry/test_coords.py:5: in <module>
    from shapely.tests.common import line_string, line_string_z, point, point_z
shapely/tests/common.py:26: in <module>
    multi_point = shapely.MultiPoint([(0, 0), (1, 2)])
shapely/geometry/multipoint.py:62: in __new__
    return shapely.multipoints(subs)
shapely/decorators.py:77: in wrapped
    return func(*args, **kwargs)
shapely/creation.py:433: in multipoints
    return lib.create_collection(geometries, typ, out=out, **kwargs)
E   TypeError: ufunc 'create_collection' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
========================= short test summary info ==========================
ERROR shapely/tests/geometry/test_coords.py - TypeError: ufunc 'create_collection' not supported for the input types,...
!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!
============================= 1 error in 0.41s =============================

I've bisected the issue to numpy/numpy@f3b669d from numpy/numpy#26905 (ping @seberg) which is related to NEP 50.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0