Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephan Seitz
pystencils
Commits
06afa33d
Commit
06afa33d
authored
Jan 13, 2020
by
Stephan Seitz
Browse files
use hashlib instead of hash for Interpolator
parent
c6648fbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/interpolation_astnodes.py
View file @
06afa33d
...
...
@@ -81,7 +81,7 @@ class Interpolator(object):
self
.
field
.
field_type
=
pystencils
.
field
.
FieldType
.
CUSTOM
self
.
address_mode
=
address_mode
self
.
use_normalized_coordinates
=
use_normalized_coordinates
hash_str
=
"%x"
%
abs
(
hash
(
self
.
field
)
+
hash
(
address_mode
)
)
hash_str
=
hashlib
.
md5
(
f
'
{
self
.
field
}
_
{
address_mode
}
'
.
encode
()).
hexdigest
(
)
self
.
symbol
=
TypedSymbol
(
'dummy_symbol_carrying_field'
+
self
.
field
.
name
+
hash_str
,
'dummy_symbol_carrying_field'
+
self
.
field
.
name
+
hash_str
)
self
.
symbol
.
field
=
self
.
field
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment