From f6797b23819e887b8269b2ab979d1bc820fd5afe Mon Sep 17 00:00:00 2001 From: Tom White Date: Thu, 16 Jan 2025 16:32:52 +0000 Subject: [PATCH] Add PendingDeprecationWarning for `map_direct` --- cubed/core/ops.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cubed/core/ops.py b/cubed/core/ops.py index f7902c4e..6d54ed7d 100644 --- a/cubed/core/ops.py +++ b/cubed/core/ops.py @@ -7,6 +7,7 @@ from numbers import Integral, Number from operator import add from typing import TYPE_CHECKING, Any, Sequence, Tuple, Union +from warnings import warn import ndindex import numpy as np @@ -982,6 +983,11 @@ def map_direct( Specification for the new array. If not specified, the one from the first side input (`args`) will be used (if any). """ + warn( + "`map_direct` is pending deprecation, please use `map_selection` instead", + PendingDeprecationWarning, + stacklevel=2, + ) from cubed.array_api.creation_functions import empty_virtual_array