@@ -22,8 +22,6 @@ def intercepted_function(f, *f_args, **f_kwargs):
22
22
else :
23
23
from ..common import jit
24
24
25
- __author__ = "Mragank Shekhar <[email protected] >"
26
-
27
25
__all__ = ["da2W" , "da2WSP" , "w2da" , "wsp2da" , "testDataArray" ]
28
26
29
27
@@ -281,7 +279,11 @@ def da2WSP(
281
279
* shape , ids , id_map , criterion , k_nas , dtype , n_jobs
282
280
) # -> (data, (row, col))
283
281
284
- sw = sparse .csr_matrix (sw_tup , shape = (n , n ), dtype = np .int8 ,)
282
+ sw = sparse .csr_matrix (
283
+ sw_tup ,
284
+ shape = (n , n ),
285
+ dtype = np .int8 ,
286
+ )
285
287
286
288
# Higher_order functionality, this uses idea from
287
289
# libpysal#313 for adding higher order neighbors.
@@ -559,10 +561,9 @@ def _index2da(data, index, attrs, coords):
559
561
fill = attrs ["nodatavals" ][0 ] if "nodatavals" in attrs else 0
560
562
data_complete = np .full (shape , fill , data .dtype )
561
563
data_complete [indexer ] = data
562
- data_complete = data_complete [:, ::- 1 ]
563
564
564
565
da = DataArray (data_complete , coords = coords , dims = dims , attrs = attrs )
565
- return da . sortby ( dims [ - 2 ], False )
566
+ return da
566
567
567
568
568
569
@jit (nopython = True , fastmath = True )
@@ -591,7 +592,13 @@ def _idmap(ids, mask, dtype):
591
592
592
593
@jit (nopython = True , fastmath = True )
593
594
def _SWbuilder (
594
- nrows , ncols , ids , id_map , criterion , k , dtype ,
595
+ nrows ,
596
+ ncols ,
597
+ ids ,
598
+ id_map ,
599
+ criterion ,
600
+ k ,
601
+ dtype ,
595
602
):
596
603
"""
597
604
Computes data and orders rows, cols, data for a single chunk
@@ -631,7 +638,13 @@ def _SWbuilder(
631
638
632
639
@jit (nopython = True , fastmath = True , nogil = True )
633
640
def _compute_chunk (
634
- nrows , ncols , ids , id_map , criterion , k , dtype ,
641
+ nrows ,
642
+ ncols ,
643
+ ids ,
644
+ id_map ,
645
+ criterion ,
646
+ k ,
647
+ dtype ,
635
648
):
636
649
"""
637
650
Computes rows cols for a single chunk
@@ -754,7 +767,9 @@ def _compute_chunk(
754
767
755
768
@jit (nopython = True , fastmath = True )
756
769
def _chunk_generator (
757
- n_jobs , starts , ids ,
770
+ n_jobs ,
771
+ starts ,
772
+ ids ,
758
773
):
759
774
"""
760
775
Construct chunks to iterate over within numba in parallel
@@ -782,7 +797,14 @@ def _chunk_generator(
782
797
783
798
784
799
def _parSWbuilder (
785
- nrows , ncols , ids , id_map , criterion , k , dtype , n_jobs ,
800
+ nrows ,
801
+ ncols ,
802
+ ids ,
803
+ id_map ,
804
+ criterion ,
805
+ k ,
806
+ dtype ,
807
+ n_jobs ,
786
808
):
787
809
"""
788
810
Computes data and orders rows, cols, data in parallel using numba
0 commit comments