Hi all,<br><br>The documentation of trace says it returns the same type as the array. Yet:<br><br><span style="font-family: courier new,monospace;">>>> trace(eye(2, dtype=int8)).dtype</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">dtype('int32')</span><br style="font-family: courier new,monospace;"><br>For float types this promotion does not occur<br><br><span style="font-family: courier new,monospace;">
>>> trace(eye(2, dtype=float32)).dtype</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">dtype('float32')</span><br style="font-family: courier new,monospace;">
<br><br>Trace operates the same way as sum. What should be the case here? And if type promotion is the default, shouldn't float32 be promoted to double?<br><br>Chuck<br>