()
| 237 | |
| 238 | @pytest.mark.skipif(shapely.geos_version < (3, 10, 0), reason="GEOS < 3.10") |
| 239 | def test_dwithin(): |
| 240 | p1 = shapely.points(50, 4) |
| 241 | p2 = shapely.points(50.1, 4.1) |
| 242 | actual = shapely.dwithin([p1, p2, None], p1, distance=0.05) |
| 243 | np.testing.assert_equal(actual, [True, False, False]) |
| 244 | assert actual.dtype == np.bool_ |
| 245 | actual = shapely.dwithin([p1, p2, None], p1, distance=0.2) |
| 246 | np.testing.assert_allclose(actual, [True, True, False]) |
| 247 | assert actual.dtype == np.bool_ |
| 248 | |
| 249 | # an array of distances |
| 250 | actual = shapely.dwithin(p1, p2, distance=[0.05, 0.2, np.nan]) |
| 251 | np.testing.assert_allclose(actual, [False, True, False]) |
| 252 | |
| 253 | |
| 254 | @pytest.mark.parametrize("geometry", all_types) |
nothing calls this directly
no test coverage detected
searching dependent graphs…