diff --git a/dask_glm/utils.py b/dask_glm/utils.py index 88a4a14..2d93cd1 100644 --- a/dask_glm/utils.py +++ b/dask_glm/utils.py @@ -40,7 +40,7 @@ def normalize_inputs(X, y, *args, **kwargs): def zeros(shape, arr=None, **kwargs): - if arr: + if arr is not None and arr.size > 0: return np.zeros_like(arr, shape=shape, **kwargs) else: return np.zeros(shape=shape, **kwargs)