mlverse / torchaudio

R interface to torchaudio
https://mlverse.github.io/torchaudio/
Other
27 stars 6 forks source link

Fix typo in normalize tensor function #42

Closed philiporlando closed 1 year ago

philiporlando commented 2 years ago

@Athospd, I noticed a typo within the definition of the normalize() function here. Python's dot notation was used instead of R's $ extract operator.

The current version produces this error:

normalize(waveform)
# Error in tensor.mean() : could not find function "tensor.mean"

Changing tensor.mean() to tensor$mean() resolves this issue.

Athospd commented 1 year ago

Thanks, @philiporlando