Return type stability fix

Missing type specification in zeros calls, causing inconsistent return type when T != Float64.
(cherry picked from commit 83494d3a3afff902c88ebf49363661f7377f5f4e)