Support nanos and from_numpy