Update java autocorr location
-from typing import List, Tuple, Optional, Union
+from typing import List, Tuple
from numpy import ndarray, fromiter, issubdtype, floating, stack
from py4j.java_gateway import java_import
@@ -9,7 +9,7 @@ from .context import KeanuContext
k = KeanuContext()
-java_import(k.jvm_view(), "io.improbable.keanu.algorithms.SampleStats")
+java_import(k.jvm_view(), "io.improbable.keanu.algorithms.statistics.Autocorrelation")
def autocorrelation(arg: List[numpy_types], index: Tuple[int, ...] = ()) -> ndarray:
@@ -17,7 +17,7 @@ def autocorrelation(arg: List[numpy_types], index: Tuple[int, ...] = ()) -> ndar
check_all_shapes_match([elem.shape for elem in arg])
check_index_is_valid(arg[0].shape, index)
arg_array = stack(arg, axis=-1)[index]
- autocorr = k.jvm_view().SampleStats.autocorrelation(k.to_java_array(arg_array))
+ autocorr = k.jvm_view().Autocorrelation.calculate(k.to_java_array(arg_array))
return fromiter(autocorr, arg[0].dtype)
