Modified the to_tensor() to be more efficient by working only with numpy arrays.
Authored by: bugman 2008-07-09
Parent: [r6893]
Child: [r6895]