argoverse / argoverse-api

Official GitHub repository for Argoverse dataset
https://www.argoverse.org
Other
839 stars 240 forks source link

fix numpy warning for deprecated functionality #199

Closed johnwlambert closed 3 years ago

johnwlambert commented 3 years ago

Fix to remove the following warning:

.../argoverse-api/argoverse/map_representation/map_api.py:78: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
benjaminrwilson commented 3 years ago

LGTM 👍

johnwlambert commented 3 years ago

Full stack trace of warnings from here:

=============================== warnings summary ===============================
.tox/py36/lib/python3.6/site-packages/motmetrics/metrics.py:57: 27 warnings
  /home/runner/work/argoverse-api/argoverse-api/.tox/py36/lib/python3.6/site-packages/motmetrics/metrics.py:57: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
    deps = inspect.getargspec(fnc).args[1:] # assumes dataframe as first argument

tests/test_eval_detection.py::test_filter_objs_to_roi
tests/test_eval_detection.py::test_AP_on_filtered_instances
  /home/runner/work/argoverse-api/argoverse-api/argoverse/map_representation/map_api.py:78: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
    lane_polygons = np.array(self.get_vector_map_lane_polygons(city_name))

tests/test_eval_detection.py::test_filter_objs_to_roi
tests/test_eval_detection.py::test_AP_on_filtered_instances
  /home/runner/work/argoverse-api/argoverse-api/argoverse/map_representation/map_api.py:79: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
    driveable_areas = np.array(self.get_vector_map_driveable_areas(city_name))