Returns the type of the array. More...

dtype type () const
 Returns the type of the array. More...
 

Detailed Description

Returns the type of the array.

Gets the type of the array as a dtype object.

array a = constant(1,3,3);
if(a.type() == f32)
printf("Got 9 floats\n");
a = mul(a, cfloat(1,1));
if(a.type() == c32)
printf("Now have 9 complex floats\n");

Function Documentation

dtype type ( ) const

Returns the type of the array.

Gets the type of the array as a dtype object.

array a = constant(1,3,3);
if(a.type() == f32)
printf("Got 9 floats\n");
a = mul(a, cfloat(1,1));
if(a.type() == c32)
printf("Now have 9 complex floats\n");
Returns
The type of the array as a dtype