html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/3574#issuecomment-565107345,https://api.github.com/repos/pydata/xarray/issues/3574,565107345,MDEyOklzc3VlQ29tbWVudDU2NTEwNzM0NQ==,1217238,2019-12-12T17:33:43Z,2019-12-12T17:33:43Z,MEMBER,"The problem is that Dask, as of version 2.0, calls functions applied to dask arrays with size zero inputs, to figure out the output array type, e.g., is the output a dense numpy.ndarray or a sparse array? Unfortunately, `numpy.vectorize` doesn't know how to large of a size 0 array to make, because it doesn't have anything like the `output_sizes` argument. For xarray, we have a couple of options: 1. we can safely assume that if the applied function is a `np.vectorize`, then it should pass `meta=np.ndarray` into the relevant dask functions (e.g., `dask.array.blockwise`). This should avoid the need to evaluate with size 0 arrays. 1. we could add an `output_sizes` argument to `np.vectorize` either upstream in NumPy or into a wrapper in Xarray. (1) is probably easiest here.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,528701910