Pedro Vicente Nunes <pvn@xxxxxxxxxxxxx> writes:
> Hi Ed
>
>>> I also noticed that H5DSget_num_scales returns -1 (FAIL) in one case
>>> when there is no scale attached. I'll take a look why we did that
>>> this way, but probably we can return 0 for this case
>
>>Well that would be better.
>
> I changed the return value of H5DSget_num_scales for a case when there are no
> scales attached from FAIL (-1) to 0
> the code is checked in our cvs repo
>
> the lines of code that were returning -1 in your case are inside the
> H5DSget_num_scales function
>
> /* try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
> if ((has_dimlist = H5LT_find_attribute(did,DIMENSION_LIST))<0)
> return FAIL;
>
> /* it does not exist */
> if (has_dimlist == 0)
> return 0;
>
> previously it returned FAIL here , the rationale was because it did not find
> the DIMENSION_LIST attribute.
> it is more correct to return 0, like you noticed, meaning that there was no
> attempt to previously attach a dimension scale to this dataset
>
> thanks for the suggestion
>
Great!
Thanks, I'll do a cvs update and try it immediately.
Ed
--
Ed Hartnett -- ed@xxxxxxxxxxxxxxxx