def to_scalar_safe(obj):
    try:
        return np.asscalar(obj)
    except:
        return obj
:param series_id:
dataset/ETHPy150Open UDST/urbansim/urbansim/utils/yamlio.py/to_scalar_safe--crossover with--dataset/ETHPy150Open ODM2/ODMToolsPython/odmtools/odmservices/series_service.py/SeriesService.get_samples_by_series_id