Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Movedtypes._core tocore.dtypes#479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
eriknw merged 2 commits intopython-graphblas:mainfromeriknw:core.dtypes
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletiongraphblas/core/operator/binary.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,9 +22,9 @@
_supports_complex,
lookup_dtype,
)
from ...dtypes._core import _sample_values
from ...exceptions import UdfParseError, check_status_carg
from .. import _has_numba, _supports_udfs, ffi, lib
from ..dtypes import _sample_values
from ..expr import InfixExprBase
from .base import (
_SS_OPERATORS,
Expand Down
2 changes: 1 addition & 1 deletiongraphblas/core/operator/indexunary.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,9 +4,9 @@

from ... import _STANDARD_OPERATOR_NAMES, indexunary, select
from ...dtypes import BOOL, FP64, INT8, INT64, UINT64, lookup_dtype
from ...dtypes._core import _sample_values
from ...exceptions import UdfParseError, check_status_carg
from .. import _has_numba, ffi, lib
from ..dtypes import _sample_values
from .base import OpBase, ParameterizedUdf, TypedOpBase, _call_op, _deserialize_parameterized

if _has_numba:
Expand Down
2 changes: 1 addition & 1 deletiongraphblas/core/operator/unary.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,9 +18,9 @@
_supports_complex,
lookup_dtype,
)
from ...dtypes._core import _sample_values
from ...exceptions import UdfParseError, check_status_carg
from .. import _has_numba, ffi, lib
from ..dtypes import _sample_values
from ..utils import output_type
from .base import (
_SS_OPERATORS,
Expand Down
2 changes: 1 addition & 1 deletiongraphblas/core/ss/matrix.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,10 +8,10 @@

from ... import binary, monoid
from ...dtypes import _INDEX, BOOL, INT64, UINT64, lookup_dtype
from ...dtypes._core import _string_to_dtype
from ...exceptions import _error_code_lookup, check_status, check_status_carg
from .. import NULL, _has_numba, ffi, lib
from ..base import call
from ..dtypes import _string_to_dtype
from ..operator import get_typed_op
from ..scalar import Scalar, _as_scalar, _scalar_index
from ..utils import (
Expand Down
2 changes: 1 addition & 1 deletiongraphblas/core/ss/vector.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,10 +7,10 @@

from ... import binary, monoid
from ...dtypes import _INDEX, INT64, UINT64, lookup_dtype
from ...dtypes._core import _string_to_dtype
from ...exceptions import _error_code_lookup, check_status, check_status_carg
from .. import NULL, ffi, lib
from ..base import call
from ..dtypes import _string_to_dtype
from ..operator import get_typed_op
from ..scalar import Scalar, _as_scalar
from ..utils import (
Expand Down
4 changes: 2 additions & 2 deletionsgraphblas/dtypes/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
from ._core import (
from ..core.dtypes import (
_INDEX,
BOOL,
FP32,
Expand All@@ -20,7 +20,7 @@
)

if _supports_complex:
from ._core import FC32, FC64
from ..core.dtypes import FC32, FC64


def __dir__():
Expand Down
12 changes: 6 additions & 6 deletionsgraphblas/tests/test_dtype.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
import pytest

import graphblas as gb
from graphblas import dtypes
from graphblas importcore,dtypes
from graphblas.core import lib
from graphblas.dtypes import lookup_dtype

Expand DownExpand Up@@ -123,7 +123,7 @@ def test_dtype_bad_comparison():


def test_dtypes_match_numpy():
for key, val indtypes._core._registry.items():
for key, val incore.dtypes._registry.items():
try:
if key is int or (isinstance(key, str) and key == "int"):
# For win64, numpy treats int as int32, not int64
Expand All@@ -137,7 +137,7 @@ def test_dtypes_match_numpy():


def test_pickle():
for val indtypes._core._registry.values():
for val incore.dtypes._registry.values():
s = pickle.dumps(val)
val2 = pickle.loads(s)
if val._is_udt: # pragma: no cover
Expand DownExpand Up@@ -205,7 +205,7 @@ def test_auto_register():


def test_default_names():
from graphblas.dtypes._core import _default_name
from graphblas.core.dtypes import _default_name

assert _default_name(np.dtype([("x", np.int32), ("y", np.float64)], align=True)) == (
"{'x': INT32, 'y': FP64}"
Expand All@@ -230,9 +230,9 @@ def test_dtype_to_from_string():
except Exception:
pass
for dtype in types:
s =dtypes._core._dtype_to_string(dtype)
s =core.dtypes._dtype_to_string(dtype)
try:
dtype2 =dtypes._core._string_to_dtype(s)
dtype2 =core.dtypes._string_to_dtype(s)
except Exception:
with pytest.raises(ValueError, match="Unknown dtype"):
lookup_dtype(dtype)
Expand Down
2 changes: 1 addition & 1 deletionpyproject.toml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -196,7 +196,7 @@ filterwarnings = [

# This deprecation warning was added in setuptools v67.5.0 (8 Mar 2023). See:
# https://setuptools.pypa.io/en/latest/history.html#v67-5-0
"ignore:pkg_resources is deprecated as an API:DeprecationWarning:pkg_resources",
"ignore:pkg_resources is deprecated as an API:DeprecationWarning:",

# sre_parse deprecated in 3.11; this is triggered by awkward 0.10
"ignore:module 'sre_parse' is deprecated:DeprecationWarning:",
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp