Blob Blame History Raw
--- libpysal-4.5.1.post2/libpysal/weights/raster.py~	2021-06-27 20:27:45.000000000 +0200
+++ libpysal-4.5.1.post2/libpysal/weights/raster.py	2021-09-01 11:14:23.283316386 +0200
@@ -249,6 +249,7 @@
         # Fallback method to build sparse matrix
         sw = lat2SW(*shape, criterion)
         if "nodatavals" in da.attrs and da.attrs["nodatavals"]:
+            sw = sw.tocsr()
             sw = sw[mask]
             sw = sw[:, mask]