We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
is_variable_numeric
is_numeric_symtype
1 parent f51778d commit b1d4592Copy full SHA for b1d4592
src/utils.jl
@@ -838,6 +838,27 @@ function is_floatingpoint_symtype(T::Type)
838
T <: AbstractArray && is_floatingpoint_symtype(eltype(T))
839
end
840
841
+"""
842
+ $(TYPEDSIGNATURES)
843
+
844
+Check if `sym` represents a symbolic number or array of numbers.
845
846
+function is_variable_numeric(sym)
847
+ sym = unwrap(sym)
848
+ T = symtype(sym)
849
+ is_numeric_symtype(T)
850
+end
851
852
853
854
855
+Check if `T` is an appropriate symtype for a symbolic variable representing a number or
856
+array of numbers.
857
858
+function is_numeric_symtype(T::Type)
859
+ return T <: Number || T <: AbstractArray && is_numeric_symtype(eltype(T))
860
861
862
"""
863
$(TYPEDSIGNATURES)
864
0 commit comments