Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-sparse
Commits
6f6c9285
Commit
6f6c9285
authored
Feb 09, 2020
by
rusty1s
Browse files
override __new__
parent
1be2aaf7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
torch_sparse/storage.py
torch_sparse/storage.py
+16
-0
No files found.
torch_sparse/storage.py
View file @
6f6c9285
...
@@ -605,3 +605,19 @@ def is_shared(self) -> bool:
...
@@ -605,3 +605,19 @@ def is_shared(self) -> bool:
SparseStorage
.
share_memory_
=
share_memory_
SparseStorage
.
share_memory_
=
share_memory_
SparseStorage
.
is_shared
=
is_shared
SparseStorage
.
is_shared
=
is_shared
def
__new__
(
cls
,
*
args
,
**
kwargs
):
instance
=
super
(
SparseStorage
,
cls
).
__new__
(
cls
,
*
args
,
**
kwargs
)
instance
.
_row
=
None
instance
.
_rowptr
=
None
instance
.
_value
=
None
instance
.
_rowcount
=
None
instance
.
_colptr
=
None
instance
.
_colcount
=
None
instance
.
_csr2csc
=
None
instance
.
_csc2csr
=
None
return
instance
SparseStorage
.
__new__
=
__new__
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment