Commit 0b578c7c authored by Éric Thiébaut's avatar Éric Thiébaut
Browse files

Provide warning method

parent b0cc4a0f
......@@ -28,6 +28,19 @@ exported_symbols(mod::Module) = begin
return symbols
end
"""
Tao.warning([io=stderr,] ...)
prints a warning message in color.
"""
warning(args...) = warning(stderr, args...)
function warning(io::IO, args...)
printstyled(io, "WARNING: "; bold=true, color=:yellow)
printstyled(io, args..., "\n"; bold=false, color=:yellow)
end
"""
Tao.floating_point_type(obj) -> T<:AbstractFloat
......@@ -61,6 +74,9 @@ to_float(types::Type{<:Real}...) = float(promote_type(types...))
to_float(T::Type{<:AbstractFloat}) = T
to_float(::Type{<:Integer}) = Float64
#------------------------------------------------------------------------------
# LAYOUT
"""
Tao.indexed_layout(inds) -> cnt, xinds
Tao.indexed_layout(msk, orient=0) -> cnt, xinds
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment