cvK()

What does cvK() do?

cvK() converts the value inside to another type based on K. K should be a type constant (tn, ts, tb, ta). Most conversions are possible except array to number and strings that aren't base ten numbers to numbers i.e. "Hello" to number

from ArrayExpressions import arrex
lst = [1, 2, 3, 4, 5]
output = arrex.evaluate(lst, "cv{ts}(20)")
print(output) # "20"

Curly brackets are reccommended to make the code cleaner, but are not necessary unless a custom function is created like 'cvts' where you would need to use curly brackets or spaces: cv ts(20)

Other Important Information:

InputArrEx code that returns a value. Can't convert arrays or some strings to numbers
Does it create a new scope?Yes
OutputAn array of all the values calculated
KAny type constant
IThe same index as last scope
Examplecv{tb}(0)
Example ExplanationThis converts 0 to a boolean, which will be false

arK()

srt()