Type casting between int64 and uint64 not possible
I recently stumbled upon an error message, which I don't quite agree with. I wanted to write the number_of_positives
to the plot/isoroc format. Since I am using python, I simply used the len(...)
function. However, I got the error message:
TypeError: cannot safely cast attribute `number_of_negatives' on dataformat `plot/isoroc/1.data_type' with type `int64' to `uint64' without precision loss
which looks weired to me. In C++, the cast from int
to unsigned
always succeeds, so I don't understand, why this is not the case in BEAT.
(In fact, is there any automatic cast that would succeed in BEAT?)
So, what do you think about that? Should we allow the automatic conversion from signed
to unsigned
?