Skip to content

Computing spectrogram throws error for python 3.13 #204

@John-Ragland

Description

@John-Ragland

This is the error message I get:

Traceback (most recent call last):
  File "<python-input-6>", line 1, in <module>
    spec = hdata.compute_spectrogram(L=2048, avg_time=0.1)
  File "<path>/ooipy/src/ooipy/hydrophone/basic.py", line 163, in compute_spectrogram
    sense_corr = -self.frequency_calibration(int(L / 2 + 1))
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "<path>/ooipy/src/ooipy/hydrophone/basic.py", line 69, in frequency_calibration
    assetID = self.get_asset_ID()
  File "<path>/ooipy/src/ooipy/hydrophone/basic.py", line 461, in get_asset_ID
    if df_start.index.to_numpy() == df_end.index.to_numpy():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: The truth value of an empty array is ambiguous. Use `array.size > 0` to check that an array is not empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions