Skip to content

Commit 2804c3a

Browse files
timonmerkstes
authored andcommitted
add deprecation warning for cindex and dindex
1 parent ecd47e9 commit 2804c3a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cebra/data/single_session.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,22 @@ class MixedDataLoader(cebra_data.Loader):
281281
positive_sampling: str = dataclasses.field(default="discrete_variable")
282282
discrete_sampling_prior: str = dataclasses.field(default="uniform")
283283

284+
@property
285+
def dindex(self):
286+
warnings.warn("dindex is deprecated. Use discrete_index instead.",
287+
DeprecationWarning)
288+
return self.dataset.discrete_index
289+
284290
@property
285291
def discrete_index(self):
286292
return self.dataset.discrete_index
287293

294+
@property
295+
def cindex(self):
296+
warnings.warn("cindex is deprecated. Use continuous_index instead.",
297+
DeprecationWarning)
298+
return self.dataset.continuous_index
299+
288300
@property
289301
def continuous_index(self):
290302
return self.dataset.continuous_index

0 commit comments

Comments
 (0)