Open apassenger opened 3 years ago
@apassenger Thanks for your question.
The error says that it expects your data to be 2 dimensional but it is actually 3 dimensional. Without being able to see what sweep_elements is it is a bit hard to figure out what exactly is going on. Could I ask you to write your examples in such a way that I can execute them directly if possible?
Hello, thanks for the answer My sweep_elements are here:
In the first code, the sweep_elements corresponds this code lines:
`with Measurement('getting_current') as msmt:
for i in Sweep(time,'time', unit = 's'): # dim = 18
for i in Sweep(range(5),'repetitions'): # dim = 5
msmt.measure(measure_current(5),name = 'dumm', label = 'holq')`
In the second code, the elements are in the list:
sweep_elements = [[time,'time','s'],[range(5),'repititons']]
And time is defined:time=np.arange(.1,1,step=.1)
n_points
is an integer value
the prog
is written in qua language. if you want I can put this code too
Hello Do you have any update?
Hi again. Please provide a Short, Self Contained, Correct (Compilable), Example http://www.sscce.org/ such that I can copy paste the code from your example to a python prompt and then execute it to see the issue. Otherwise I will have to manually piece together the pieces that you have provided and I unfortunately do not have. Also if possible please write the example such that it does not depend on qua
Hello, I am trying to write the following function in a more dynamic way:
Here, instead of writing many sweep and many for loop, I am giving the sweep elements into an array like that:
sweep_elements = [[time,'time','s'],[range(5),'repititons']]
And I am writing the following codeHowever it is not working and I am getting this error : measurement.py in _add_measurement_result(self, action_indices, result, parameter, store, name, label, unit) 557 ndim = len(self.loop_indices) 558 if len(data_array.set_arrays) != ndim + result.ndim: --> 559 raise RuntimeError( 560 f"Wrong number of set arrays for {data_array.name}. " 561 f"Expected {ndim + result.ndim} instead of "
RuntimeError: Wrong number of set arrays for result. Expected 2 instead of 3. I have no idea what I did wrong. It seems to me all correct Could you please help me and tell me what is going on here
Thanks, Best