@@ -483,71 +483,69 @@ def __geo_interface__(self) -> dict[str, object]:
483483
484484def test_generic_getset () -> None :
485485 # type_id
486- check (assert_type (shapely .get_type_id (P ), int ), np .integer )
487- check (assert_type (shapely .get_type_id (None ), int ), np .integer )
488- check (assert_type (shapely .get_type_id ([P ]), NDArray [np .int64 ]), np .ndarray , dtype = np .integer )
489- check (assert_type (shapely .get_type_id ([None ]), NDArray [np .int64 ]), np .ndarray , dtype = np .integer )
486+ check (assert_type (shapely .get_type_id (P ), np . int32 ), np .int32 )
487+ check (assert_type (shapely .get_type_id (None ), np . int32 ), np .int32 )
488+ check (assert_type (shapely .get_type_id ([P ]), NDArray [np .int64 ]), np .ndarray , dtype = np .int32 )
489+ check (assert_type (shapely .get_type_id ([None ]), NDArray [np .int64 ]), np .ndarray , dtype = np .int32 )
490490 check (
491- assert_type (shapely .get_type_id ((P , None )), NDArray [np .int64 ]), np .ndarray , dtype = np .integer
491+ assert_type (shapely .get_type_id ((P , None )), NDArray [np .int64 ]), np .ndarray , dtype = np .int32
492492 )
493493
494494 # dimensions
495- check (assert_type (shapely .get_dimensions (P ), int ), np .integer )
496- check (assert_type (shapely .get_dimensions (None ), int ), np .integer )
497- check (assert_type (shapely .get_dimensions ([P ]), NDArray [np .int64 ]), np .ndarray , dtype = np .integer )
495+ check (assert_type (shapely .get_dimensions (P ), np . int32 ), np .int32 )
496+ check (assert_type (shapely .get_dimensions (None ), np . int32 ), np .int32 )
497+ check (assert_type (shapely .get_dimensions ([P ]), NDArray [np .int64 ]), np .ndarray , dtype = np .int32 )
498498 check (
499- assert_type (shapely .get_dimensions ([None ]), NDArray [np .int64 ]), np .ndarray , dtype = np .integer
499+ assert_type (shapely .get_dimensions ([None ]), NDArray [np .int64 ]), np .ndarray , dtype = np .int32
500500 )
501501 check (
502502 assert_type (shapely .get_dimensions ((P , None )), NDArray [np .int64 ]),
503503 np .ndarray ,
504- dtype = np .integer ,
504+ dtype = np .int32 ,
505505 )
506506
507507 # coordinate_dimension
508- check (assert_type (shapely .get_coordinate_dimension (P ), int ), np .integer )
509- check (assert_type (shapely .get_coordinate_dimension (None ), int ), np .integer )
508+ check (assert_type (shapely .get_coordinate_dimension (P ), np . int32 ), np .int32 )
509+ check (assert_type (shapely .get_coordinate_dimension (None ), np . int32 ), np .int32 )
510510 check (
511511 assert_type (shapely .get_coordinate_dimension ([P ]), NDArray [np .int64 ]),
512512 np .ndarray ,
513- dtype = np .integer ,
513+ dtype = np .int32 ,
514514 )
515515 check (
516516 assert_type (shapely .get_coordinate_dimension ([None ]), NDArray [np .int64 ]),
517517 np .ndarray ,
518- dtype = np .integer ,
518+ dtype = np .int32 ,
519519 )
520520 check (
521521 assert_type (shapely .get_coordinate_dimension ((P , None )), NDArray [np .int64 ]),
522522 np .ndarray ,
523- dtype = np .integer ,
523+ dtype = np .int32 ,
524524 )
525525
526526 # num_coordinates
527- check (assert_type (shapely .get_num_coordinates (P ), int ), np .integer )
528- check (assert_type (shapely .get_num_coordinates (None ), int ), np .integer )
527+ check (assert_type (shapely .get_num_coordinates (P ), np . int32 ), np .int32 )
528+ check (assert_type (shapely .get_num_coordinates (None ), np . int32 ), np .int32 )
529529 check (
530- assert_type (shapely .get_num_coordinates ([P ]), NDArray [np .int64 ]),
531- np .ndarray ,
532- dtype = np .integer ,
530+ assert_type (shapely .get_num_coordinates ([P ]), NDArray [np .int64 ]), np .ndarray , dtype = np .int32
533531 )
534532 check (
535533 assert_type (shapely .get_num_coordinates ([None ]), NDArray [np .int64 ]),
536534 np .ndarray ,
537- dtype = np .integer ,
535+ dtype = np .int32 ,
538536 )
539537 check (
540538 assert_type (shapely .get_num_coordinates ((P , None )), NDArray [np .int64 ]),
541539 np .ndarray ,
542- dtype = np .integer ,
540+ dtype = np .int32 ,
543541 )
544542
545543 # srid
546- check (assert_type (shapely .get_srid (P ), int ), np .integer )
547- check (assert_type (shapely .get_srid (None ), int ), np .integer )
548- check (assert_type (shapely .get_srid ([P ]), NDArray [np .int64 ]), np .ndarray , dtype = np .integer )
549- check (assert_type (shapely .get_srid ([None ]), NDArray [np .int64 ]), np .ndarray , dtype = np .integer )
550- check (assert_type (shapely .get_srid ((P , None )), NDArray [np .int64 ]), np .ndarray , dtype = np .integer )
544+ check (assert_type (shapely .get_srid (P ), np . int32 ), np .int32 )
545+ check (assert_type (shapely .get_srid (None ), np . int32 ), np .int32 )
546+ check (assert_type (shapely .get_srid ([P ]), NDArray [np .int64 ]), np .ndarray , dtype = np .int32 )
547+ check (assert_type (shapely .get_srid ([None ]), NDArray [np .int64 ]), np .ndarray , dtype = np .int32 )
548+ check (assert_type (shapely .get_srid ((P , None )), NDArray [np .int64 ]), np .ndarray , dtype = np .int32 )
551549
552550 check (assert_type (shapely .set_srid (P , 20 ), Point ), Point )
553551 check (assert_type (shapely .set_srid (None , 20 ), None ), NoneType )
@@ -560,8 +558,8 @@ def test_generic_getset() -> None:
560558 )
561559
562560 # precision
563- check (assert_type (shapely .get_precision (None ), float ), float )
564- check (assert_type (shapely .get_precision (P ), float ), float )
561+ check (assert_type (shapely .get_precision (None ), np . float64 ), np . float64 )
562+ check (assert_type (shapely .get_precision (P ), np . float64 ), np . float64 )
565563 check (assert_type (shapely .get_precision ([P ]), NDArray [np .float64 ]), np .ndarray , dtype = float )
566564 check (assert_type (shapely .get_precision ([None ]), NDArray [np .float64 ]), np .ndarray , dtype = float )
567565 check (
@@ -615,23 +613,23 @@ def test_generic_getset() -> None:
615613
616614
617615def test_point_getset () -> None :
618- check (assert_type (shapely .get_x (P ), float ), float )
619- check (assert_type (shapely .get_x (LS ), float ), float )
620- check (assert_type (shapely .get_x (None ), float ), float )
616+ check (assert_type (shapely .get_x (P ), np . float64 ), np . float64 )
617+ check (assert_type (shapely .get_x (LS ), np . float64 ), np . float64 )
618+ check (assert_type (shapely .get_x (None ), np . float64 ), np . float64 )
621619 check (assert_type (shapely .get_x ([P ]), NDArray [np .float64 ]), np .ndarray , dtype = float )
622620 check (assert_type (shapely .get_x ([None ]), NDArray [np .float64 ]), np .ndarray , dtype = float )
623621 check (assert_type (shapely .get_x ((P , None )), NDArray [np .float64 ]), np .ndarray , dtype = float )
624622
625- check (assert_type (shapely .get_y (P ), float ), float )
626- check (assert_type (shapely .get_y (LS ), float ), float )
627- check (assert_type (shapely .get_y (None ), float ), float )
623+ check (assert_type (shapely .get_y (P ), np . float64 ), np . float64 )
624+ check (assert_type (shapely .get_y (LS ), np . float64 ), np . float64 )
625+ check (assert_type (shapely .get_y (None ), np . float64 ), np . float64 )
628626 check (assert_type (shapely .get_y ([P ]), NDArray [np .float64 ]), np .ndarray , dtype = float )
629627 check (assert_type (shapely .get_y ([None ]), NDArray [np .float64 ]), np .ndarray , dtype = float )
630628 check (assert_type (shapely .get_y ((P , None )), NDArray [np .float64 ]), np .ndarray , dtype = float )
631629
632- check (assert_type (shapely .get_z (P ), float ), float )
633- check (assert_type (shapely .get_z (LS ), float ), float )
634- check (assert_type (shapely .get_z (None ), float ), float )
630+ check (assert_type (shapely .get_z (P ), np . float64 ), np . float64 )
631+ check (assert_type (shapely .get_z (LS ), np . float64 ), np . float64 )
632+ check (assert_type (shapely .get_z (None ), np . float64 ), np . float64 )
635633 check (assert_type (shapely .get_z ([P ]), NDArray [np .float64 ]), np .ndarray , dtype = float )
636634 check (assert_type (shapely .get_z ([None ]), NDArray [np .float64 ]), np .ndarray , dtype = float )
637635 check (assert_type (shapely .get_z ((P , None )), NDArray [np .float64 ]), np .ndarray , dtype = float )
@@ -658,17 +656,17 @@ def test_linestring_getset() -> None:
658656 check (assert_type (shapely .get_point (LS , [0 ]), NDArray [np .object_ ]), np .ndarray , dtype = Point )
659657 check (assert_type (shapely .get_point ([LS ], [0 ]), NDArray [np .object_ ]), np .ndarray , dtype = Point )
660658
661- check (assert_type (shapely .get_num_points (LS ), int ), np .integer )
662- check (assert_type (shapely .get_num_points (P ), int ), np .integer )
663- check (assert_type (shapely .get_num_points (None ), int ), np .integer )
664- check (assert_type (shapely .get_num_points ([P ]), NDArray [np .int64 ]), np .ndarray , dtype = np .integer )
659+ check (assert_type (shapely .get_num_points (LS ), np . int32 ), np .int32 )
660+ check (assert_type (shapely .get_num_points (P ), np . int32 ), np .int32 )
661+ check (assert_type (shapely .get_num_points (None ), np . int32 ), np .int32 )
662+ check (assert_type (shapely .get_num_points ([P ]), NDArray [np .int64 ]), np .ndarray , dtype = np .int32 )
665663 check (
666- assert_type (shapely .get_num_points ([None ]), NDArray [np .int64 ]), np .ndarray , dtype = np .integer
664+ assert_type (shapely .get_num_points ([None ]), NDArray [np .int64 ]), np .ndarray , dtype = np .int32
667665 )
668666 check (
669667 assert_type (shapely .get_num_points ((P , None )), NDArray [np .int64 ]),
670668 np .ndarray ,
671- dtype = np .integer ,
669+ dtype = np .int32 ,
672670 )
673671
674672
@@ -735,23 +733,23 @@ def test_polygon_getset() -> None:
735733 dtype = LinearRing ,
736734 )
737735
738- check (assert_type (shapely .get_num_interior_rings (PO ), int ), np .integer )
739- check (assert_type (shapely .get_num_interior_rings (P ), int ), np .integer )
740- check (assert_type (shapely .get_num_interior_rings (None ), int ), np .integer )
736+ check (assert_type (shapely .get_num_interior_rings (PO ), np . int32 ), np .int32 )
737+ check (assert_type (shapely .get_num_interior_rings (P ), np . int32 ), np .int32 )
738+ check (assert_type (shapely .get_num_interior_rings (None ), np . int32 ), np .int32 )
741739 check (
742740 assert_type (shapely .get_num_interior_rings ([P ]), NDArray [np .int64 ]),
743741 np .ndarray ,
744- dtype = np .integer ,
742+ dtype = np .int32 ,
745743 )
746744 check (
747745 assert_type (shapely .get_num_interior_rings ([None ]), NDArray [np .int64 ]),
748746 np .ndarray ,
749- dtype = np .integer ,
747+ dtype = np .int32 ,
750748 )
751749 check (
752750 assert_type (shapely .get_num_interior_rings ((P , None )), NDArray [np .int64 ]),
753751 np .ndarray ,
754- dtype = np .integer ,
752+ dtype = np .int32 ,
755753 )
756754
757755
@@ -787,23 +785,21 @@ def test_collection_getset() -> None:
787785 assert_type (shapely .get_geometry ([MP ], [0 ]), NDArray [np .object_ ]), np .ndarray , dtype = Point
788786 )
789787
790- check (assert_type (shapely .get_num_geometries (MP ), int ), np .integer )
791- check (assert_type (shapely .get_num_geometries (P ), int ), np .integer )
792- check (assert_type (shapely .get_num_geometries (None ), int ), np .integer )
788+ check (assert_type (shapely .get_num_geometries (MP ), np . int32 ), np .int32 )
789+ check (assert_type (shapely .get_num_geometries (P ), np . int32 ), np .int32 )
790+ check (assert_type (shapely .get_num_geometries (None ), np . int32 ), np .int32 )
793791 check (
794- assert_type (shapely .get_num_geometries ([P ]), NDArray [np .int64 ]),
795- np .ndarray ,
796- dtype = np .integer ,
792+ assert_type (shapely .get_num_geometries ([P ]), NDArray [np .int64 ]), np .ndarray , dtype = np .int32
797793 )
798794 check (
799795 assert_type (shapely .get_num_geometries ([None ]), NDArray [np .int64 ]),
800796 np .ndarray ,
801- dtype = np .integer ,
797+ dtype = np .int32 ,
802798 )
803799 check (
804800 assert_type (shapely .get_num_geometries ((P , None )), NDArray [np .int64 ]),
805801 np .ndarray ,
806- dtype = np .integer ,
802+ dtype = np .int32 ,
807803 )
808804
809805 check (assert_type (shapely .get_parts (P ), NDArray [np .object_ ]), np .ndarray , dtype = Point )
@@ -825,7 +821,7 @@ def test_collection_getset() -> None:
825821 dtype = np .ndarray ,
826822 )
827823 check (assert_type (parts_with_index [0 ], NDArray [np .object_ ]), np .ndarray , dtype = BaseGeometry )
828- check (assert_type (parts_with_index [1 ], NDArray [np .int64 ]), np .ndarray , dtype = np .integer )
824+ check (assert_type (parts_with_index [1 ], NDArray [np .int64 ]), np .ndarray , dtype = np .int64 )
829825 check (
830826 assert_type (
831827 shapely .get_parts (None , return_index = True ),
@@ -871,7 +867,7 @@ def test_collection_getset() -> None:
871867 dtype = np .ndarray ,
872868 )
873869 check (assert_type (parts_with_index [0 ], NDArray [np .object_ ]), np .ndarray , dtype = LinearRing )
874- check (assert_type (parts_with_index [1 ], NDArray [np .int64 ]), np .ndarray , dtype = np .integer )
870+ check (assert_type (parts_with_index [1 ], NDArray [np .int64 ]), np .ndarray , dtype = np .int64 )
875871 check (
876872 assert_type (
877873 shapely .get_rings (None , return_index = True ),
0 commit comments