-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Some functions / methods assume that if the input is of a certain type the output will be of the same type.
math.matrix([1], 'dense', 'number').map(x=>math.unit(x,'m'))
// results in a DenseMatrix of units of type numberMaybe the dispatch system could also include information on the type that will be returned for a certain input.
math.typed('unit', {
'number, string -> unit': (num, str) => math.unit(num, str)
})Metadata
Metadata
Assignees
Labels
No labels