Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
simonetgordon committed Oct 20, 2022
1 parent 8a8b963 commit 16efd8b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion determine_tests.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pickle # noqa
from pydriller import Repository
import os
import os # noqa
import bz2
import _pickle as cPickle

Expand Down
7 changes: 6 additions & 1 deletion ivy/functional/backends/jax/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,25 @@
# Extra #
# ------#


class RNGWrapper:
def __init__ (self):
def __init__(self):
self.key = jax.random.PRNGKey(0)


RNG = RNGWrapper()


def _setRNG(key):
global RNG
RNG.key = key


def _getRNG():
global RNG
return RNG.key


def random_uniform(
*,
low: Union[float, JaxArray] = 0.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1237,12 +1237,11 @@ def test_jax_numpy_argmin(
)


#bitwise_and
# bitwise_and
@handle_cmd_line_args
@given(
dtype_and_x=helpers.dtype_and_values(
available_dtypes=helpers.get_dtypes("bool"),
num_arrays=2
available_dtypes=helpers.get_dtypes("bool"), num_arrays=2
),
num_positional_args=helpers.num_positional_args(
fn_name="ivy.functional.frontends.jax.numpy.bitwise_and"
Expand All @@ -1264,7 +1263,7 @@ def test_jax_numpy_bitwise_and_bool(
frontend="jax",
fn_tree="numpy.bitwise_and",
x1=x[0],
x2=x[1]
x2=x[1],
)


Expand Down Expand Up @@ -1297,5 +1296,5 @@ def test_jax_numpy_bitwise_and_int(
frontend="jax",
fn_tree="numpy.bitwise_and",
x1=x[0][0],
x2=x[0][1]
x2=x[0][1],
)
3 changes: 1 addition & 2 deletions run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
test = line[:-1]
print(test)
ret = os.system(
f'docker run --rm -v "$(pwd)":/ivy -v "$(pwd)"/.hypothesis:/.hypothesis unifyai/ivy:latest python3 -m pytest {test}'
# noqa
f'docker run --rm -v "$(pwd)":/ivy -v "$(pwd)"/.hypothesis:/.hypothesis unifyai/ivy:latest python3 -m pytest {test}' # noqa
)
if ret != 0:
failed = True
Expand Down

0 comments on commit 16efd8b

Please sign in to comment.