Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[scipy] Use NumPy functions rather than their deprecated aliases in SciPy's namespace. #1798

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Changes from all 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
4 changes: 2 additions & 2 deletions trax/data/tf_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1766,7 +1766,7 @@ def compute_single_result(op_name, num_args):
elif op_name == 'gain_percent':
return 100 + num_args[0]
elif op_name == 'gcd':
return scipy.gcd(int(num_args[0]), int(num_args[1]))
return np.gcd(int(num_args[0]), int(num_args[1]))
elif op_name == 'inverse':
if num_args[0] != 0:
return 1 / num_args[0]
Expand Down Expand Up @@ -1961,7 +1961,7 @@ def single_op_to_python_command(op_name, num_args):
elif op_name == 'gain_percent':
return '100 + {}'.format(num_args[0])
elif op_name == 'gcd':
return 'scipy.gcd(int({}), int({}))'.format(num_args[0], num_args[1])
return 'np.gcd(int({}), int({}))'.format(num_args[0], num_args[1])
elif op_name == 'inverse':
# safe inverse
if num_args[0] != 0:
Expand Down
Loading