Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 35c133a

Browse files
committed
Apply review changes
1 parent 8ce7e9e commit 35c133a

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

doc/source/reference/routines.set.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Boolean operations
1515
.. autosummary::
1616
:toctree: generated/
1717

18-
ediff1d
1918
in1d
2019
intersect1d
2120
isin

numpy/lib/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,23 @@ def __getattr__(attr):
6666
import math
6767
import warnings
6868

69+
def _private_module_msg(module_name: str) -> str:
70+
return (
71+
f"`np.lib.{module_name}` is now private. Function that you're "
72+
"looking for should be available from the main namespace `np.*`"
73+
)
74+
6975
if attr == 'math':
7076
warnings.warn(
7177
"`np.lib.math` is a deprecated alias for the standard library "
7278
"`math` module (Deprecated Numpy 1.25). Replace usages of "
7379
"`numpy.lib.math` with `math`", DeprecationWarning, stacklevel=2)
7480
return math
81+
elif attr in (
82+
"histograms", "type_check", "nanfunctions", "function_base",
83+
"arraypad", "arraysetops", "ufunclike", "utils"
84+
):
85+
raise AttributeError(_private_module_msg(attr))
7586
else:
7687
raise AttributeError("module {!r} has no attribute "
7788
"{!r}".format(__name__, attr))
78-

0 commit comments

Comments
 (0)