Skip to content

Commit

Permalink
fix: Removed useless statements in few files. (#27209)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sai-Suraj-27 authored Nov 4, 2023
1 parent 8d0ad81 commit fe8827b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions ivy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,7 @@ def is_fully_defined(self):
shape is not None for shape in self._shape
)

property

@property
def num_elements(self):
if not self.is_fully_defined():
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ def gradient(
edge_order: int = 1,
) -> Union[tf.Tensor, List[tf.Tensor]]:
# https://github.com/numpy/numpy/blob/v1.24.3/numpy/lib/function_base.py#L969-L1312
x.device
x = tf.experimental.numpy.asanyarray(x)
N = x.ndim # number of dimensions
if axis is None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def test_parafac2_to_tensor(weights, factors, projections, true_res):
projections = [ivy.array(p) for p in projections]
true_res = ivy.array(true_res)
res = ivy.Parafac2Tensor.parafac2_to_tensor((weights, factors, projections))
(true_res, res)
assert np.allclose(res, true_res)


Expand Down

0 comments on commit fe8827b

Please sign in to comment.