change the function as the from_numpy implementation changes