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.

NDArray.Index.cs 1.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using static Tensorflow.Binding;
  6. namespace Tensorflow.NumPy
  7. {
  8. public partial class NDArray
  9. {
  10. public NDArray this[int index]
  11. {
  12. get
  13. {
  14. return _tensor[index];
  15. }
  16. set
  17. {
  18. }
  19. }
  20. public NDArray this[params int[] index]
  21. {
  22. get
  23. {
  24. return _tensor[index.Select(x => new Slice(x, x + 1)).ToArray()];
  25. }
  26. set
  27. {
  28. }
  29. }
  30. public NDArray this[params Slice[] slices]
  31. {
  32. get
  33. {
  34. return _tensor[slices];
  35. }
  36. set
  37. {
  38. }
  39. }
  40. public NDArray this[NDArray mask]
  41. {
  42. get
  43. {
  44. throw new NotImplementedException("");
  45. }
  46. set
  47. {
  48. }
  49. }
  50. }
  51. }