DylanMuir/MappedTensor

Shortcut casting still causes errors

marcsous opened this issue · 1 comments

As before, the order of the cast/scale operations is fixed so it is going to be wrong some of the time. I don't think there is an easy remedy :(

>> a=MappedTensor(1);
>> a(1)=1.3;
>> a=uint8(2*a);a(1)
ans =
    2
>> a=1.3;
>> a=uint8(2*a);a(1)
ans =
    3

Yeah, there's no perfect solution. I (previously) fixed the bug that scaling would mess up the class of the returned data, and I added a note to say that rounding may not work as expected if transparent casting and scaling are both used.