signetlabdei/sem

Error with xarray

mrequena opened this issue · 2 comments

Running example wifi-plotting-example gives an error when calling get_results_as_xarray:

Traceback (most recent call last):
File "my-wifi-plotting-xarray.py", line 120, in
main()
File "my-wifi-plotting-xarray.py", line 78, in main
'AvgThroughput', runs)
File "/mnt/data/sem/git-repos/develop/sem/manager.py", line 370, in get_results_as_xarray
dims=list(clean_parameter_space.keys()))
File "/usr/local/lib/python3.5/dist-packages/xarray/core/dataarray.py", line 227, in init
coords, dims = _infer_coords_and_dims(data.shape, coords, dims)
File "/usr/local/lib/python3.5/dist-packages/xarray/core/dataarray.py", line 82, in _infer_coords_and_dims
'coordinate %r' % (d, sizes[d], s, k))
ValueError: conflicting sizes for dimension 'nWifi': length 3 on the data but length 2 on coordinate 'nWifi'

When I run the example different times, I get different errors. Each time the error is related with a different parameter, but always related to the call to get_results_as_xarray:

  • ValueError: conflicting sizes for dimension 'distance': length 3 on the data but length 2 on coordinate 'distance'
  • ValueError: conflicting sizes for dimension 'useShortGuardInterval': length 3 on the data but length 2 on coordinate 'useShortGuardInterval'
  • ValueError: conflicting sizes for dimension 'useRts': length 3 on the data but length 2 on coordinate 'useRts'

Environment:
Ubuntu 16.04
python 3.5.2
xarray 0.10.7

Hi! I've encountered this in the past and thought I had fixed it.

Which version (branch or commit) of the library are you using? I can't seem to replicate this on the current development branch - can you try updating your sem installation in case it is not up to date?

You are right. I was using master branch. With develop branch the issue is not present. I close the issue.