Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ We recommend continuously running your code through `pylint` and `mypy` during t

### Installation

1. Install [black](https://pypi.org/project/black/) and [isort](https://pycqa.github.io/isort/) for code formating
1. Install [black](https://pypi.org/project/black/) and [isort](https://pycqa.github.io/isort/) for code formatting
```bash
pip3 install black && isort
```
Expand Down
8 changes: 4 additions & 4 deletions nada_numpy/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def sub(
return NotImplemented

if not ignore_scale and self.log_scale != other.log_scale:
raise ValueError("Cannot substract values with different scales.")
raise ValueError("Cannot subtract values with different scales.")

if isinstance(other, SecretRational):
return SecretRational(
Expand Down Expand Up @@ -1402,7 +1402,7 @@ def sub(self, other: _NadaRational, ignore_scale: bool = False) -> "SecretRation
return NotImplemented

if not ignore_scale and self.log_scale != other.log_scale:
raise ValueError("Cannot substract values with different scales.")
raise ValueError("Cannot subtract values with different scales.")

return SecretRational(self.value - other.value, self.log_scale)

Expand Down Expand Up @@ -2912,7 +2912,7 @@ def _chebyshev_polynomials(x: _NadaRational, terms: int) -> np.ndarray:
NadaArray of polynomials evaluated at x of shape `(terms, *x)`.

Raises:
ValueError: Raised if 'terrms' is odd and < 6.
ValueError: Raised if 'terms' is odd and < 6.
"""
if terms % 2 != 0 or terms < 6:
raise ValueError("Chebyshev terms must be even and >= 6")
Expand Down Expand Up @@ -2979,7 +2979,7 @@ def _hardtanh(
# absolute value
sgn = sign(x)
abs_x = x * sgn
# chekc if inside [-abs_range, abs_range] interval
# check if inside [-abs_range, abs_range] interval
ineight_cond = abs_x < abs_range
result = ineight_cond.if_else(output, abs_const * sgn)

Expand Down