Conversation
/databricks/python/lib/python3.8/site-packages/tslearn/barycenters/softdtw.py:103: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray X_ = numpy.array([to_time_series(d, remove_nans=True) for d in X_]) Because this method often uses numpy arrays with different shapes, I think the approach is justified here.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #360 +/- ##
==========================================
+ Coverage 94.71% 94.74% +0.02%
==========================================
Files 59 59
Lines 4525 4525
==========================================
+ Hits 4286 4287 +1
+ Misses 239 238 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @brk21 Thanks for pointing out this deprecation warning! It seems to me that it is not even necessary to cast the list into a numpy array, or is it? Couldn't we do something like: X_ = [to_time_series(Xi, remove_nans=True) for Xi in X_]? |
|
Hi @rtavenar, I think you are right, but I also think we will generate the same warning in the https://github.com/tslearn-team/tslearn/blob/main/tslearn/utils/utils.py#L146 So you may end up adding the Please let me know if I can support in any way. Ross |
|
I would like to avoid the |
|
@rtavenar I would be strongly opposed to that because one of the main values of If you wanted to port |
I meant raising a |
|
Phew @rtavenar Apologies for the misunderstanding. Yes, I would be fine with that. |
/databricks/python/lib/python3.8/site-packages/tslearn/barycenters/softdtw.py:103: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
X_ = numpy.array([to_time_series(d, remove_nans=True) for d in X_])
Because this method often uses numpy arrays with different shapes, I think the approach is justified here.