@@ -15,46 +15,26 @@ public partial class np
1515 public static readonly Slice newaxis = new Slice ( null , null , 1 ) { IsNewAxis = true } ;
1616
1717 // https://docs.scipy.org/doc/numpy-1.16.0/user/basics.types.html
18- public static readonly Type bool_ = typeof ( bool ) ;
19- public static readonly Type bool8 = bool_ ;
20- public static readonly Type @bool = bool_ ;
21-
22- public static readonly Type @char = typeof ( char ) ;
23-
24- public static readonly Type @byte = typeof ( byte ) ;
25- public static readonly Type uint8 = typeof ( byte ) ;
26- public static readonly Type ubyte = uint8 ;
27-
28-
29- public static readonly Type int16 = typeof ( short ) ;
30-
31- public static readonly Type uint16 = typeof ( ushort ) ;
32-
33- public static readonly Type int32 = typeof ( int ) ;
34-
35- public static readonly Type uint32 = typeof ( uint ) ;
36-
37- public static readonly Type int_ = typeof ( long ) ;
38- public static readonly Type int64 = int_ ;
39- public static readonly Type intp = int_ ; //TODO! IntPtr?
40- public static readonly Type int0 = int_ ;
41-
42- public static readonly Type uint64 = typeof ( ulong ) ;
43- public static readonly Type uint0 = uint64 ;
44- public static readonly Type @uint = uint64 ;
45-
46- public static readonly Type float32 = typeof ( float ) ;
47-
48- public static readonly Type float_ = typeof ( double ) ;
49- public static readonly Type float64 = float_ ;
50- public static readonly Type @double = float_ ;
51-
52- public static readonly Type complex_ = typeof ( Complex ) ;
53- public static readonly Type complex128 = complex_ ;
54- public static readonly Type complex64 = complex_ ;
55- public static readonly Type @decimal = typeof ( decimal ) ;
56-
57- public static Type chars => throw new NotSupportedException ( "Please use char with extra dimension." ) ;
18+ #region data type
19+ public static readonly TF_DataType @bool = TF_DataType . TF_BOOL ;
20+ public static readonly TF_DataType @char = TF_DataType . TF_INT8 ;
21+ public static readonly TF_DataType @byte = TF_DataType . TF_INT8 ;
22+ public static readonly TF_DataType uint8 = TF_DataType . TF_UINT8 ;
23+ public static readonly TF_DataType ubyte = TF_DataType . TF_UINT8 ;
24+ public static readonly TF_DataType int16 = TF_DataType . TF_INT16 ;
25+ public static readonly TF_DataType uint16 = TF_DataType . TF_UINT16 ;
26+ public static readonly TF_DataType int32 = TF_DataType . TF_INT32 ;
27+ public static readonly TF_DataType uint32 = TF_DataType . TF_UINT32 ;
28+ public static readonly TF_DataType int64 = TF_DataType . TF_INT64 ;
29+ public static readonly TF_DataType uint64 = TF_DataType . TF_UINT64 ;
30+ public static readonly TF_DataType float32 = TF_DataType . TF_FLOAT ;
31+ public static readonly TF_DataType float64 = TF_DataType . TF_DOUBLE ;
32+ public static readonly TF_DataType @double = TF_DataType . TF_DOUBLE ;
33+ public static readonly TF_DataType @decimal = TF_DataType . TF_DOUBLE ;
34+ public static readonly TF_DataType complex_ = TF_DataType . TF_COMPLEX ;
35+ public static readonly TF_DataType complex64 = TF_DataType . TF_COMPLEX64 ;
36+ public static readonly TF_DataType complex128 = TF_DataType . TF_COMPLEX128 ;
37+ #endregion
5838
5939 public static double nan => double . NaN ;
6040 public static double NAN => double . NaN ;
@@ -70,8 +50,6 @@ public partial class np
7050 public static double Infinity => double . PositiveInfinity ;
7151 public static double infinity => double . PositiveInfinity ;
7252
73-
74-
7553 public static bool array_equal ( NDArray a , NDArray b )
7654 => throw new NotImplementedException ( "" ) ;
7755
0 commit comments