Skip to content

Commit

Permalink
Closes Bears-R-Us#3353 reference numpy functions without alias (Bears…
Browse files Browse the repository at this point in the history
…-R-Us#3662)

Co-authored-by: Amanda Potts <ajpotts@users.noreply.github.com>
  • Loading branch information
ajpotts and ajpotts committed Aug 21, 2024
1 parent f7d276b commit 5450963
Show file tree
Hide file tree
Showing 37 changed files with 197 additions and 250 deletions.
2 changes: 1 addition & 1 deletion arkouda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
__version__ = get_versions()["version"]
del get_versions

from arkouda.numpy import *
from arkouda.array_view import *
from arkouda.client import *
from arkouda.client_dtypes import *
from arkouda.dtypes import *
from arkouda.pdarrayclass import *
from arkouda.sorting import *
from arkouda.pdarraysetops import *
Expand Down
8 changes: 4 additions & 4 deletions arkouda/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

from arkouda.categorical import Categorical
from arkouda.client import generic_msg
from arkouda.dtypes import bigint
from arkouda.dtypes import float64 as akfloat64
from arkouda.dtypes import int64 as akint64
from arkouda.dtypes import uint64 as akuint64
from arkouda.numpy.dtypes import bigint
from arkouda.numpy.dtypes import float64 as akfloat64
from arkouda.numpy.dtypes import int64 as akint64
from arkouda.numpy.dtypes import uint64 as akuint64
from arkouda.groupbyclass import GroupBy, broadcast, unique
from arkouda.numeric import cumsum, where
from arkouda.pdarrayclass import create_pdarray, pdarray
Expand Down
4 changes: 2 additions & 2 deletions arkouda/array_api/creation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import numpy as np
from arkouda.pdarrayclass import create_pdarray, pdarray, _to_pdarray
from arkouda.pdarraycreation import scalar_array
from arkouda.dtypes import dtype as akdtype
from arkouda.dtypes import resolve_scalar_dtype
from arkouda.numpy.dtypes import dtype as akdtype
from arkouda.numpy.dtypes import resolve_scalar_dtype

if TYPE_CHECKING:
from ._typing import (
Expand Down
2 changes: 1 addition & 1 deletion arkouda/array_api/statistical_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import numpy as np

from arkouda.client import generic_msg
from arkouda.dtypes import dtype as akdtype
from arkouda.numpy.dtypes import dtype as akdtype
from arkouda.numeric import cast as akcast
from arkouda.pdarrayclass import create_pdarray, parse_single_value
from arkouda.pdarraycreation import scalar_array
Expand Down
2 changes: 1 addition & 1 deletion arkouda/array_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np

from arkouda.client import generic_msg
from arkouda.dtypes import resolve_scalar_dtype
from arkouda.numpy.dtypes import resolve_scalar_dtype
from arkouda.numeric import cast as akcast
from arkouda.numeric import cumprod, where
from arkouda.pdarrayclass import create_pdarray, parse_single_value, pdarray
Expand Down
8 changes: 4 additions & 4 deletions arkouda/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
from typeguard import typechecked

from arkouda.client import generic_msg
from arkouda.dtypes import bool_ as akbool
from arkouda.dtypes import dtype as akdtype
from arkouda.dtypes import int64 as akint64
from arkouda.dtypes import int_scalars, resolve_scalar_dtype, str_, str_scalars
from arkouda.numpy.dtypes import bool_ as akbool
from arkouda.numpy.dtypes import dtype as akdtype
from arkouda.numpy.dtypes import int64 as akint64
from arkouda.numpy.dtypes import int_scalars, resolve_scalar_dtype, str_, str_scalars
from arkouda.groupbyclass import GroupBy, unique
from arkouda.infoclass import information
from arkouda.logger import getArkoudaLogger
Expand Down
4 changes: 2 additions & 2 deletions arkouda/client_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import numpy as np
from typeguard import typechecked

from arkouda.dtypes import bitType, intTypes, isSupportedInt
from arkouda.dtypes import uint64 as akuint64
from arkouda.numpy.dtypes import bitType, intTypes, isSupportedInt
from arkouda.numpy.dtypes import uint64 as akuint64
from arkouda.groupbyclass import GroupBy, broadcast
from arkouda.numeric import cast as akcast
from arkouda.numeric import where
Expand Down
10 changes: 5 additions & 5 deletions arkouda/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
from arkouda.categorical import Categorical
from arkouda.client import generic_msg, maxTransferBytes
from arkouda.client_dtypes import BitVector, Fields, IPv4
from arkouda.dtypes import bigint
from arkouda.dtypes import bool_ as akbool
from arkouda.dtypes import float64 as akfloat64
from arkouda.dtypes import int64 as akint64
from arkouda.dtypes import uint64 as akuint64
from arkouda.numpy.dtypes import bigint
from arkouda.numpy.dtypes import bool_ as akbool
from arkouda.numpy.dtypes import float64 as akfloat64
from arkouda.numpy.dtypes import int64 as akint64
from arkouda.numpy.dtypes import uint64 as akuint64
from arkouda.groupbyclass import GROUPBY_REDUCTION_TYPES
from arkouda.groupbyclass import GroupBy as akGroupBy
from arkouda.groupbyclass import unique
Expand Down
3 changes: 3 additions & 0 deletions arkouda/dtypes/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# flake8: noqa

from arkouda.numpy.dtypes import *
14 changes: 7 additions & 7 deletions arkouda/groupbyclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
no_type_check,
)

from arkouda.dtypes import dtype as akdtype
from arkouda.numpy.dtypes import dtype as akdtype

if TYPE_CHECKING:
from arkouda.categorical import Categorical
Expand All @@ -23,12 +23,12 @@
from typeguard import typechecked

from arkouda.client import generic_msg
from arkouda.dtypes import _val_isinstance_of_union, bigint
from arkouda.dtypes import float64 as akfloat64
from arkouda.dtypes import float_scalars
from arkouda.dtypes import int64 as akint64
from arkouda.dtypes import int_scalars
from arkouda.dtypes import uint64 as akuint64
from arkouda.numpy.dtypes import _val_isinstance_of_union, bigint
from arkouda.numpy.dtypes import float64 as akfloat64
from arkouda.numpy.dtypes import float_scalars
from arkouda.numpy.dtypes import int64 as akint64
from arkouda.numpy.dtypes import int_scalars
from arkouda.numpy.dtypes import uint64 as akuint64
from arkouda.logger import getArkoudaLogger
from arkouda.pdarrayclass import RegistrationError, create_pdarray, is_sorted, pdarray
from arkouda.pdarraycreation import arange, full
Expand Down
10 changes: 5 additions & 5 deletions arkouda/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from typeguard import typechecked

from arkouda import Categorical, Strings
from arkouda.dtypes import bool_ as akbool
from arkouda.dtypes import float64 as akfloat64
from arkouda.dtypes import int64 as akint64
from arkouda.numpy.dtypes import bool_ as akbool
from arkouda.numpy.dtypes import float64 as akfloat64
from arkouda.numpy.dtypes import int64 as akint64
from arkouda.groupbyclass import GroupBy, unique
from arkouda.numeric import cast as akcast
from arkouda.pdarrayclass import RegistrationError, pdarray
Expand Down Expand Up @@ -179,7 +179,7 @@ def __ne__(self, other):
return values != other_values

def _dtype_of_list_values(self, lst):
from arkouda.dtypes import dtype
from arkouda.numpy.dtypes import dtype

if isinstance(lst, list):
d = dtype(type(lst[0]))
Expand Down Expand Up @@ -220,7 +220,7 @@ def inferred_type(self) -> str:
Return a string of the type inferred from the values.
"""
if isinstance(self.values, list):
from arkouda.dtypes import float_scalars, int_scalars
from arkouda.numpy.dtypes import float_scalars, int_scalars
from arkouda.util import _is_dtype_in_union

if _is_dtype_in_union(self.dtype, int_scalars):
Expand Down
2 changes: 1 addition & 1 deletion arkouda/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from arkouda.segarray import SegArray
from arkouda.strings import Strings
from arkouda.timeclass import Datetime, Timedelta
from arkouda.dtypes import float32, float64, int32, int64
from arkouda.numpy.dtypes import float32, float64, int32, int64

__all__ = [
"get_filetype",
Expand Down
6 changes: 3 additions & 3 deletions arkouda/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from arkouda.alignment import right_align
from arkouda.categorical import Categorical
from arkouda.client import generic_msg
from arkouda.dtypes import NUMBER_FORMAT_STRINGS
from arkouda.dtypes import int64 as akint64
from arkouda.dtypes import resolve_scalar_dtype
from arkouda.numpy.dtypes import NUMBER_FORMAT_STRINGS
from arkouda.numpy.dtypes import int64 as akint64
from arkouda.numpy.dtypes import resolve_scalar_dtype
from arkouda.groupbyclass import GroupBy, broadcast
from arkouda.numeric import cumsum
from arkouda.pdarrayclass import create_pdarray, pdarray
Expand Down
2 changes: 1 addition & 1 deletion arkouda/matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import cast

from arkouda.client import generic_msg
from arkouda.dtypes import str_scalars
from arkouda.numpy.dtypes import str_scalars
from arkouda.infoclass import list_symbol_table
from arkouda.logger import getArkoudaLogger
from arkouda.match import Match, MatchType
Expand Down
2 changes: 1 addition & 1 deletion arkouda/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from typeguard import typechecked

from arkouda.dtypes import isSupportedNumber, resolve_scalar_dtype
from arkouda.numpy.dtypes import isSupportedNumber, resolve_scalar_dtype


class ParameterObject:
Expand Down
10 changes: 5 additions & 5 deletions arkouda/numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
from typeguard import typechecked

from arkouda.client import generic_msg
from arkouda.dtypes import DTypes, bigint
from arkouda.dtypes import dtype as akdtype
from arkouda.dtypes import int64 as akint64
from arkouda.dtypes import (
from arkouda.groupbyclass import GroupBy
from arkouda.numpy.dtypes import DTypes, bigint
from arkouda.numpy.dtypes import dtype as akdtype
from arkouda.numpy.dtypes import int64 as akint64
from arkouda.numpy.dtypes import (
int_scalars,
isSupportedNumber,
numeric_scalars,
resolve_scalar_dtype,
str_,
)
from arkouda.groupbyclass import GroupBy
from arkouda.pdarrayclass import all as ak_all
from arkouda.pdarrayclass import any as ak_any
from arkouda.pdarrayclass import argmax, create_pdarray, pdarray, sum
Expand Down
119 changes: 4 additions & 115 deletions arkouda/numpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
base_repr,
binary_repr,
byte,
bytes_,
cdouble,
cfloat,
clongdouble,
clongfloat,
compat,
csingle,
datetime64,
double,
e,
euler_gamma,
finfo,
flexible,
float32,
float64,
float_,
floating,
format_float_positional,
Expand All @@ -37,10 +37,6 @@
inexact,
inf,
infty,
int8,
int16,
int32,
int64,
intc,
intp,
isscalar,
Expand All @@ -59,17 +55,15 @@
short,
signedinteger,
single,
timedelta64,
ubyte,
uint,
uint8,
uint16,
uint32,
uint64,
uintc,
uintp,
ulonglong,
unsignedinteger,
ushort,
void,
)

from arkouda.numpy import (
Expand Down Expand Up @@ -102,108 +96,3 @@
from arkouda.numpy.rec import *

from ._numeric import floor

__all__ = [
"DataSource",
"False_",
"Inf",
"Infinity",
"NAN",
"NINF",
"NZERO",
"NaN",
"PINF",
"PZERO",
"RankWarning",
"ScalarType",
"TooHardError",
"True_",
"_builtins",
"_mat",
"_numeric",
"_typing",
"add_docstring",
"add_newdoc",
"base_repr",
"binary_repr",
"bool_",
"byte",
"cdouble",
"cfloat",
"char",
"character",
"clongdouble",
"clongfloat",
"compat",
"csingle",
"ctypeslib",
"deprecate",
"deprecate_with_doc",
"disp",
"double",
"dtypes",
"e",
"emath",
"euler_gamma",
"exceptions",
"fft",
"finfo",
"flexible",
"float32",
"float64",
"float_",
"floating",
"floor",
"format_float_positional",
"format_float_scientific",
"format_parser",
"half",
"iinfo",
"inexact",
"inf",
"infty",
"int16",
"int32",
"int64",
"int8",
"int_",
"intc",
"integer",
"intp",
"isscalar",
"issctype",
"issubclass_",
"issubdtype",
"lib",
"linalg",
"longdouble",
"longfloat",
"longlong",
"ma",
"maximum_sctype",
"nan",
"number",
"object_",
"pi",
"polynomial",
"promote_types",
"rec",
"sctypeDict",
"sctypes",
"short",
"signedinteger",
"single",
"str_",
"typename",
"ubyte",
"uint",
"uint16",
"uint32",
"uint64",
"uint8",
"uintc",
"uintp",
"ulonglong",
"unsignedinteger",
"ushort",
]
2 changes: 1 addition & 1 deletion arkouda/numpy/_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from arkouda.client import generic_msg
from arkouda.pdarrayclass import create_pdarray, pdarray
from arkouda.dtypes import (
from arkouda.numpy.dtypes import (
int64 as ak_int64,
float64 as ak_float64,
bool_ as ak_bool,
Expand Down
Loading

0 comments on commit 5450963

Please sign in to comment.