dash.assert.scalarType
Throw error if input is not a scalar of a required data type
Syntax
Description
Checks if input is scalar and an allowed data type. If not, throws an error.
Uses a custom name for the input in error messages
Uses a custom header for thrown error IDs.
Input Arguments
input
any data type
The input being tested
types
string vector | []
The allowed data types of the input. Use an empty array to not require a data type
name
string scalar
The name of the input in the calling function. Default is “input”
idHeader
string scalar
Header for thrown error IDs. Default is “DASH:assert:scalarType”