pub fn arrayd_to_tensor<T1, T2>( a: ArrayD<T1>, add_batch_dim: bool, ) -> Result<Tensor>where T1: AsPrimitive<T2>, T2: WithDType,