Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error when selecting large ranges in Interpretation #1024

Merged
merged 1 commit into from
Jan 26, 2023
Merged

Conversation

jopohl
Copy link
Owner

@jopohl jopohl commented Jan 26, 2023

Fix errors like this:

[ERROR::SignalFrame.py::update_number_selected_samples] ndarray is not C-contiguous
Traceback (most recent call last):
  File "/home/andy/work/repository/urh/src/urh/controller/widgets/SignalFrame.py", line 320, in update_number_selected_samples
    power = np.mean(self.signal.iq_array.subarray(start, end, step_size).magnitudes_normalized)
  File "/home/andy/work/repository/urh/src/urh/signalprocessing/IQArray.py", line 86, in magnitudes_normalized
    return self.magnitudes / np.sqrt(self.maximum**2.0 + self.minimum**2.0)
  File "/home/andy/work/repository/urh/src/urh/signalprocessing/IQArray.py", line 82, in magnitudes
    return get_magnitudes(self.__data)
  File "src/urh/cythonext/util.pyx", line 128, in urh.cythonext.util.__pyx_fuse_0get_magnitudes
  File "stringsource", line 660, in View.MemoryView.memoryview_cwrapper
  File "stringsource", line 350, in View.MemoryView.memoryview.__cinit__
ValueError: ndarray is not C-contiguous

when selecting larger ranges of a Signal in Intepretation.

@jopohl jopohl changed the title Fix error when selecting large ranges Fix error when selecting large ranges in Interpretation Jan 26, 2023
@jopohl jopohl merged commit 8673a1e into master Jan 26, 2023
@jopohl jopohl deleted the contwarn branch January 26, 2023 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant