Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arraycontext
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
arraycontext
Commits
6f59ff9f
"git@gitlab.tiker.net:inducer/grudge.git" did not exist on "242674129c1edf3380ea99d8ef409c0379a059a8"
Commit
6f59ff9f
authored
3 years ago
by
Kaushik Kulkarni
Committed by
Andreas Klöckner
6 months ago
Browse files
Options
Downloads
Patches
Plain Diff
ArrayContainer fixes for numpy arrays as leaf classes
parent
5bf46bc6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arraycontext/container/__init__.py
+5
-1
5 additions, 1 deletion
arraycontext/container/__init__.py
with
5 additions
and
1 deletion
arraycontext/container/__init__.py
+
5
−
1
View file @
6f59ff9f
...
@@ -218,7 +218,11 @@ def is_array_container(ary: Any) -> bool:
...
@@ -218,7 +218,11 @@ def is_array_container(ary: Any) -> bool:
"
cheaper option, see is_array_container_type.
"
,
"
cheaper option, see is_array_container_type.
"
,
DeprecationWarning
,
stacklevel
=
2
)
DeprecationWarning
,
stacklevel
=
2
)
return
(
serialize_container
.
dispatch
(
ary
.
__class__
)
return
(
serialize_container
.
dispatch
(
ary
.
__class__
)
is
not
serialize_container
.
__wrapped__
)
# type:ignore[attr-defined]
is
not
serialize_container
.
__wrapped__
# type:ignore[attr-defined]
# numpy values with scalar elements aren't array containers
and
not
(
isinstance
(
ary
,
np
.
ndarray
)
and
ary
.
dtype
.
kind
!=
"
O
"
)
)
@singledispatch
@singledispatch
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment