Bugs in telemac_file.get_data_on_horizontal_slice()
Thanks for access to issue tracker and for the great software. There are some bugs in python-function
data_manip.extraction.get_data_on_horizontal_slice().
#1064: @param zslices (numpy.array/list/int) Elevation of the slice or
- It states that zslices may be an int, this should be a float. Suggested new line:
- @param zslices (float or numpy.array/list of float) Elevation of the slice
#1079: elif isinstance(zslices, int):
- Should be float instead
- elif isinstance(zslices, float):
#1080: res = np.zeros(((self.npoin2), zslices), dtype=np.float64)
- When using zslices=float, the array's second dimension is 1. Suggested new line:
- res = np.zeros(((self.npoin2), 1), dtype=np.float64)
#1107: shz = (zslice[i]-values_elevation[i, j]) /\
- Error in indexing, should be zslice[j]. Suggested new line:
- shz = (zslice[j]-values_elevation[i, j]) /\
#1117: if isinstance(zslices, int):
- if isinstance(zslices, float):
Note that the notebook extraction/3d_extraction.ipynb, did not crash on these bugs because it was not using nplanref and had zslices equal to exactly 1.
Edited by Jurjen De Jong