mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Remove unused dict_ops.py functions
This commit is contained in:
parent
1566ce2435
commit
22bc068bce
1 changed files with 0 additions and 26 deletions
|
@ -20,29 +20,3 @@ def merge_dicts_recursively(*dicts):
|
|||
else:
|
||||
result[key] = value
|
||||
return result
|
||||
|
||||
|
||||
def soft_dict_update(d1, d2):
|
||||
"""
|
||||
Adds key values pairs of d2 to d1 only when d1 doesn't
|
||||
already have that key
|
||||
"""
|
||||
for key, value in list(d2.items()):
|
||||
if key not in d1:
|
||||
d1[key] = value
|
||||
|
||||
|
||||
def dict_eq(d1, d2):
|
||||
if len(d1) != len(d2):
|
||||
return False
|
||||
for key in d1:
|
||||
value1 = d1[key]
|
||||
value2 = d2[key]
|
||||
if type(value1) != type(value2):
|
||||
return False
|
||||
if type(d1[key]) == np.ndarray:
|
||||
if any(d1[key] != d2[key]):
|
||||
return False
|
||||
elif d1[key] != d2[key]:
|
||||
return False
|
||||
return True
|
||||
|
|
Loading…
Add table
Reference in a new issue