You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Numpy.Math.cs 1.2 kB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Numerics;
  5. using System.Text;
  6. using static Tensorflow.Binding;
  7. namespace Tensorflow.NumPy
  8. {
  9. public partial class np
  10. {
  11. public static NDArray exp(NDArray x)
  12. => new NDArray(tf.exp(x));
  13. public static NDArray log(NDArray x)
  14. => new NDArray(tf.log(x));
  15. public static NDArray multiply(NDArray x1, NDArray x2)
  16. => new NDArray(tf.multiply(x1, x2));
  17. public static NDArray maximum(NDArray x1, NDArray x2)
  18. => new NDArray(tf.maximum(x1, x2));
  19. public static NDArray minimum(NDArray x1, NDArray x2)
  20. => new NDArray(tf.minimum(x1, x2));
  21. public static NDArray prod(NDArray array, Axis? axis = null, Type? dtype = null, bool keepdims = false)
  22. => new NDArray(tf.reduce_prod(array, axis: axis));
  23. public static NDArray prod<T>(params T[] array) where T : unmanaged
  24. => new NDArray(tf.reduce_prod(new NDArray(array)));
  25. public static NDArray sqrt(NDArray x)
  26. => new NDArray(tf.sqrt(x));
  27. public static NDArray sum(NDArray x1, Axis? axis = null)
  28. => new NDArray(tf.math.sum(x1, axis));
  29. }
  30. }