|
120 | 120 | __all__ = ['exceptions']
|
121 | 121 |
|
122 | 122 | from . import core
|
123 |
| - from .core import * |
| 123 | + from .core import ( |
| 124 | + _no_nep50_warning, memmap, |
| 125 | + iinfo, finfo, # getlimits submodule exports |
| 126 | + False_, ScalarType, True_, abs, absolute, add, all, allclose, alltrue, |
| 127 | + amax, amin, any, arange, arccos, arccosh, arcsin, arcsinh, arctan, |
| 128 | + arctan2, arctanh, argmax, argmin, argpartition, argsort, argwhere, |
| 129 | + around, array, array2string, array_equal, array_equiv, array_repr, |
| 130 | + array_str, asanyarray, asarray, ascontiguousarray, asfortranarray, |
| 131 | + atleast_1d, atleast_2d, atleast_3d, base_repr, binary_repr, |
| 132 | + bitwise_and, bitwise_not, bitwise_or, bitwise_xor, block, bool_, |
| 133 | + broadcast, busday_count, busday_offset, busdaycalendar, byte, bytes_, |
| 134 | + can_cast, cbrt, cdouble, ceil, cfloat, char, character, chararray, |
| 135 | + choose, clip, clongdouble, clongfloat, compare_chararrays, complex_, |
| 136 | + complexfloating, compress, concatenate, conj, conjugate, convolve, |
| 137 | + copysign, copyto, correlate, cos, cosh, count_nonzero, cross, csingle, |
| 138 | + cumprod, cumproduct, cumsum, datetime64, datetime_as_string, |
| 139 | + datetime_data, deg2rad, degrees, diagonal, divide, divmod, dot, |
| 140 | + double, dtype, e, einsum, einsum_path, empty, empty_like, equal, |
| 141 | + errstate, euler_gamma, exp, exp2, expm1, fabs, find_common_type, |
| 142 | + flatiter, flatnonzero, flexible, float128, float16, float32, float64, |
| 143 | + float_, float_power, floating, floor, floor_divide, fmax, fmin, fmod, |
| 144 | + format_float_positional, format_float_scientific, format_parser, |
| 145 | + frexp, from_dlpack, frombuffer, fromfile, fromfunction, fromiter, |
| 146 | + frompyfunc, fromstring, full, full_like, gcd, generic, geomspace, |
| 147 | + get_printoptions, getbufsize, geterr, geterrcall, greater, |
| 148 | + greater_equal, half, heaviside, hstack, hypot, identity, iinfo, |
| 149 | + indices, inexact, inf, infty, inner, int16, int32, int64, int8, int_, |
| 150 | + intc, integer, intp, invert, is_busday, isclose, isfinite, isfortran, |
| 151 | + isinf, isnan, isnat, isscalar, issctype, issubdtype, lcm, ldexp, |
| 152 | + left_shift, less, less_equal, lexsort, linspace, little_endian, log, |
| 153 | + log10, log1p, log2, logaddexp, logaddexp2, logical_and, logical_not, |
| 154 | + logical_or, logical_xor, logspace, longcomplex, longdouble, |
| 155 | + longfloat, longlong, matmul, max, maximum, maximum_sctype, |
| 156 | + may_share_memory, mean, min, min_scalar_type, minimum, mod, |
| 157 | + modf, moveaxis, multiply, nan, nbytes, ndarray, ndim, nditer, |
| 158 | + negative, nested_iters, newaxis, nextafter, nonzero, not_equal, |
| 159 | + number, obj2sctype, object_, ones, ones_like, outer, partition, |
| 160 | + pi, positive, power, printoptions, prod, product, promote_types, |
| 161 | + ptp, put, putmask, rad2deg, radians, ravel, rec, recarray, reciprocal, |
| 162 | + record, remainder, repeat, require, reshape, resize, result_type, |
| 163 | + right_shift, rint, roll, rollaxis, round, round_, sctype2char, |
| 164 | + sctypeDict, sctypes, searchsorted, set_printoptions, |
| 165 | + set_string_function, setbufsize, seterr, seterrcall, shape, |
| 166 | + shares_memory, short, sign, signbit, signedinteger, sin, single, |
| 167 | + singlecomplex, sinh, size, sometrue, sort, spacing, sqrt, square, |
| 168 | + squeeze, stack, std, str_, string_, subtract, sum, swapaxes, take, |
| 169 | + tan, tanh, tensordot, test, timedelta64, trace, transpose, |
| 170 | + true_divide, trunc, typecodes, ubyte, ufunc, uint, uint16, uint32, |
| 171 | + uint64, uint8, uintc, uintp, ulonglong, unicode_, unsignedinteger, |
| 172 | + ushort, var, vdot, void, vstack, warnings, where, zeros, zeros_like |
| 173 | + ) |
| 174 | + |
124 | 175 | from . import exceptions
|
125 | 176 | from . import dtypes
|
126 | 177 | from . import lib
|
127 | 178 | # NOTE: to be revisited following future namespace cleanup.
|
128 | 179 | # See gh-14454 and gh-15672 for discussion.
|
129 |
| - from .lib import * |
| 180 | + from .lib import ( |
| 181 | + DataSource, angle, append, apply_along_axis, apply_over_axes, |
| 182 | + array_split, asarray_chkfinite, asfarray, average, bartlett, |
| 183 | + bincount, blackman, broadcast_arrays, broadcast_shapes, |
| 184 | + broadcast_to, byte_bounds, c_, column_stack, common_type, |
| 185 | + copy, corrcoef, cov, delete, diag, diag_indices, |
| 186 | + diag_indices_from, diagflat, diff, digitize, dsplit, dstack, |
| 187 | + ediff1d, emath, expand_dims, extract, eye, fill_diagonal, fix, |
| 188 | + flip, fliplr, flipud, fromregex, get_array_wrap, genfromtxt, |
| 189 | + get_include, gradient, hamming, hanning, histogram, histogram2d, |
| 190 | + histogram_bin_edges, histogramdd, hsplit, i0, imag, in1d, |
| 191 | + index_exp, info, insert, interp, intersect1d, iscomplex, |
| 192 | + iscomplexobj, isin, isneginf, isreal, isrealobj, issubclass_, |
| 193 | + issubsctype, iterable, ix_, kaiser, kron, load, loadtxt, mask_indices, |
| 194 | + median, meshgrid, mgrid, mintypecode, msort, nan_to_num, |
| 195 | + nanargmax, nanargmin, nancumprod, nancumsum, nanmax, nanmean, |
| 196 | + nanmedian, nanmin, nanpercentile, nanprod, nanquantile, nanstd, |
| 197 | + nansum, nanvar, ndenumerate, ndindex, ogrid, packbits, pad, |
| 198 | + percentile, piecewise, place, poly, poly1d, polyadd, polyder, |
| 199 | + polydiv, polyfit, polyint, polymul, polynomial, polysub, polyval, |
| 200 | + put_along_axis, quantile, r_, ravel_multi_index, real, real_if_close, |
| 201 | + roots, rot90, row_stack, s_, save, savetxt, savez, savez_compressed, |
| 202 | + select, setdiff1d, setxor1d, show_runtime, sinc, sort_complex, split, |
| 203 | + take_along_axis, test, tile, tracemalloc_domain, trapz, tri, tril, |
| 204 | + tril_indices, tril_indices_from, typename, union1d, unique, unpackbits, |
| 205 | + unravel_index, unwrap, vander, vectorize, vsplit |
| 206 | + ) |
130 | 207 |
|
131 | 208 | from . import linalg
|
132 | 209 | from . import fft
|
|
135 | 212 | from . import ctypeslib
|
136 | 213 | from . import ma
|
137 | 214 | from . import matrixlib as _mat
|
138 |
| - from .matrixlib import * |
| 215 | + from .matrixlib import ( |
| 216 | + asmatrix, bmat, defmatrix, mat, matrix, test |
| 217 | + ) |
139 | 218 |
|
140 | 219 | # We build warning messages for former attributes
|
141 | 220 | _msg = (
|
|
177 | 256 | # import with `from numpy import *`.
|
178 | 257 | __future_scalars__ = {"bool", "long", "ulong", "str", "bytes", "object"}
|
179 | 258 |
|
180 |
| - from .core import abs |
181 | 259 | # now that numpy core module is imported, can initialize limits
|
182 | 260 | core.getlimits._register_known_types()
|
183 | 261 |
|
|
194 | 272 | # These are exported by np.core, but are replaced by the builtins below
|
195 | 273 | # remove them to ensure that we don't end up with `np.long == np.int_`,
|
196 | 274 | # which would be a breaking change.
|
197 |
| - del long, unicode |
198 | 275 | __all__.remove('long')
|
199 | 276 | __all__.remove('unicode')
|
200 | 277 |
|
|
205 | 282 | # The list below will grow until the `from .lib import *` fixme above is
|
206 | 283 | # taken care of
|
207 | 284 | __all__.remove('Arrayterator')
|
208 |
| - del Arrayterator |
209 | 285 |
|
210 | 286 | # Filter out Cython harmless warnings
|
211 | 287 | warnings.filterwarnings("ignore", message="numpy.dtype size changed")
|
|
0 commit comments