Skip to content

Commit

Permalink
add some funcs to common
Browse files Browse the repository at this point in the history
  • Loading branch information
to24toro committed Nov 2, 2023
1 parent 9e9529c commit 5d99e54
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions test/dynamics/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ def asarray(self, a):
"""Array generation method."""
return np.array(a)

def zeros(self, shape, dtype= None):
def zeros(self, shape, dtype=None):
"""Array filled with zeros generation method."""
return np.zeros(shape,dtype)
return np.zeros(shape, dtype)

def ones(self, shape, dtype= None):
def ones(self, shape, dtype=None):
"""Array filled with ones generation method."""
return np.ones(shape,dtype)
return np.ones(shape, dtype)

def assertArrayType(self, a):
"""Assert the correct array type."""
Expand Down Expand Up @@ -125,13 +125,13 @@ def asarray(self, a):
"""Array generation method."""
return jnp.array(a)

def zeros(self, shape, dtype= None):
def zeros(self, shape, dtype=None):
"""Array filled with zeros generation method."""
return jnp.zeros(shape,dtype)
return jnp.zeros(shape, dtype)

def ones(self, shape, dtype= None):
def ones(self, shape, dtype=None):
"""Array filled with ones generation method."""
return jnp.ones(shape,dtype)
return jnp.ones(shape, dtype)

def assertArrayType(self, a):
"""Assert the correct array type."""
Expand All @@ -150,13 +150,13 @@ def asarray(self, a):
"""Array generation method."""
return Array(a)

def zeros(self, shape, dtype= None):
def zeros(self, shape, dtype=None):
"""Array filled with zeros generation method."""
return Array(np.zeros(shape,dtype))
return Array(np.zeros(shape, dtype))

def ones(self, shape, dtype= None):
def ones(self, shape, dtype=None):
"""Array filled with ones generation method."""
return Array(np.ones(shape,dtype))
return Array(np.ones(shape, dtype))

def assertArrayType(self, a):
"""Assert the correct array type."""
Expand Down Expand Up @@ -193,13 +193,13 @@ def asarray(self, a):
"""Array generation method."""
return Array(a)

def zeros(self, shape, dtype= None):
def zeros(self, shape, dtype=None):
"""Array filled with zeros generation method."""
return Array(jnp.zeros(shape,dtype))
return Array(jnp.zeros(shape, dtype))

def ones(self, shape, dtype= None):
def ones(self, shape, dtype=None):
"""Array filled with ones generation method."""
return Array(jnp.ones(shape,dtype))
return Array(jnp.ones(shape, dtype))

def assertArrayType(self, a):
"""Assert the correct array type."""
Expand Down

0 comments on commit 5d99e54

Please sign in to comment.