@@ -29,7 +29,7 @@ def get_scaling_factor(nr_observations: int, nr_components: int) -> float:
2929
3030
3131def  get_nr_primary_components (
32-     responses : npt .NDArray [np .float64 ], threshold : float 
32+     responses : npt .NDArray [np .float32 ], threshold : float 
3333) ->  int :
3434    """ 
3535    Calculate the number of principal components required 
@@ -61,7 +61,7 @@ def get_nr_primary_components(
6161
6262
6363def  cluster_responses (
64-     responses : npt .NDArray [np .float64 ],
64+     responses : npt .NDArray [np .float32 ],
6565    nr_clusters : int ,
6666) ->  npt .NDArray [np .int_ ]:
6767    """ 
@@ -70,7 +70,7 @@ def cluster_responses(
7070    be clustered together. 
7171    """ 
7272    correlation  =  spearmanr (responses ).statistic 
73-     if  isinstance (correlation , np .float64 ):
73+     if  isinstance (correlation , np .floating ):
7474        correlation  =  np .array ([[1 , correlation ], [correlation , 1 ]])
7575    # Take absolute value to cluster based on correlation strength rather 
7676    # than direction. 
@@ -84,9 +84,9 @@ def cluster_responses(
8484
8585
8686def  main (
87-     responses : npt .NDArray [np .float64 ],
88-     obs_errors : npt .NDArray [np .float64 ],
89- ) ->  tuple [npt .NDArray [np .float64 ], npt .NDArray [np .int_ ], npt .NDArray [np .int_ ]]:
87+     responses : npt .NDArray [np .floating ],
88+     obs_errors : npt .NDArray [np .floating ],
89+ ) ->  tuple [npt .NDArray [np .floating ], npt .NDArray [np .int_ ], npt .NDArray [np .int_ ]]:
9090    """ 
9191    Perform 'Auto Scaling' to mitigate issues with correlated observations in ensemble 
9292    smoothers. 
0 commit comments