stumpy-dev/stumpy

Add Preliminary Polars Support

Closed this issue · 0 comments

In theory, with the np.asarray(T) standard, all array-like data structures that implement this standard (i.e., Polars) should be compatible with STUMPY. A simple test of:

import polars as pl
import numpy as np
import stumpy
import numpy.testing as npt


t = [1., 20., 3., 40., 5., 60., 7., 80., 9., 1000.]
T = pl.Series(t)
m = 4
npt.assert_almost_equal(stumpy.stump(T, 4), stumpy.stump(t, 4))

Errors out with:

AttributeError: 'Series' object has no attribute 'copy'

Once this is overcome, then polars "should work"