Skip to content

Commit

Permalink
simplify np.asfortranarray in get_duration
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Lostanlen committed Aug 31, 2019
1 parent d4decce commit 77056dd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions librosa/core/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,7 @@ def get_duration(y=None, sr=22050, S=None, n_fft=2048, hop_length=512,

else:
# Ensure Fortran contiguity.
if not np.isfortran(y):
y = np.asfortranarray(y)
y = np.asfortranarray(y)

# Validate the audio buffer. Stereo is okay here.
util.valid_audio(y, mono=False)
Expand Down

0 comments on commit 77056dd

Please sign in to comment.