IsScalar

Description

Determines whether a shape is a scalar, which means that GetDimNum() is 0.

Prototype

bool IsScalar() const

Parameters

None

Returns

true and false

Restrictions

None

Example

Shape shape0({3, 256, 256});
Shape shape2;
shape0.IsScalar(); // false
shape2.IsScalar(); // true