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

Hotfix/awg70000 makeseqxfile #1213

Conversation

WilliamHPNielsen
Copy link
Contributor

Fixes a bug discovered in the lab just now.

Changes proposed in this pull request:

  • Add a test reproducing the bug
  • Fix the failing line

@astafan8

When the elements have different numbers of points, the current driver's
call to np.shape(wfms) will raise an exception
@codecov
Copy link

codecov bot commented Jul 30, 2018

Codecov Report

Merging #1213 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1213   +/-   ##
=======================================
  Coverage   80.38%   80.38%           
=======================================
  Files          49       49           
  Lines        6801     6801           
=======================================
  Hits         5467     5467           
  Misses       1334     1334

Copy link
Contributor

@astafan8 astafan8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did not really get what went wrong, but the code now seems more clear, so i just accept :) (hope that len(wfm[0]) is indeed the number of elements)

@WilliamHPNielsen
Copy link
Contributor Author

@astafan8 for your curiosity: wfms is a list of lists of multidimensional np.arrays (waveform, marker, marker). If the arrays have different lengths, np.shape of the lists is undefined.

Something like

np.shape([[np.zeros((3, 4)), np.zeros((3, 3))]])

does not work, although it should; it is a single channel with two elements having respectively 4 and 3 points.

@astafan8
Copy link
Contributor

aaa., ok, thanks for the explanation. then perhaps numpy expects an array to be like a matrix, while in your case it is not. you basically have to manually account for the fact that your arrays in the lists may have linear-algebra-incompatible shapes. but i'm not sure, whatever.

@WilliamHPNielsen WilliamHPNielsen merged commit b2344b7 into microsoft:master Jul 31, 2018
giulioungaretti pushed a commit that referenced this pull request Jul 31, 2018
Merge: 3672f85 d05ad47
Author: William H.P. Nielsen <whpn@mailbox.org>

    Merge pull request #1213 from WilliamHPNielsen/hotfix/awg70000_makeseqxfile
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.

None yet

2 participants