Post Reply 
table data
02-22-2019, 12:23 AM (This post was last modified: 04-25-2019 02:31 AM by compsystems.)
Post: #1
table data
Hello,
Python has an object type called DICTIONARY that in xcas / hpprime is table(), but python, only manages a few types of data in relation to xcas, which can operate with many more and powerfull math types.

Examples of use


PHP Code:
tblA := table"float_1" 5.0 "integer_2" 5"complex_4" 3+4*i"identifier_6" var01"list_7" = [9,[8,7],[6,5,4]],   "symbolic_8" x+y*"rational_9" 3/4,  "string_12" "Hello",  "set_2" seta,a],  "polynomial_10" poly11, -611, -] , "matrix" = [[1,2],[3,4]], "vector" = [9,8,7,6,5,4], "function_13" f(x):=x+1  )
[
enterreturns
table
… )


tblA"float_1" ], tblA"integer_2" ], tblA"complex_4" ], tblA"identifier_6" ], tblA"list_7" ], tblA"symbolic_8" ], tblA"rational_9" ], tblA"string_12" ], tblA"function_13" ],  tblA[  "set_2" ],  tblA[  "polynomial_10" ], tblA[  "matrix"  ],  tblA[  "vector"  ]
[
enterreturns
5.0
,5,3+4*i,var01,[9,[8,7],[6,5,4]],x+i*y,3/4,"Hello", (x)->x+1,set[a,b,c],poly1[1,-6,11,-6],[[1,2],[3,4]],[9,8,7,6,5,4]


typetblA"float_1" ] ), typetblA"integer_2" ] ), typetblA"complex_4" ] ), typetblA"identifier_6" ] ), typetblA"list_7" ] ), typetblA"symbolic_8" ] ), typetblA"rational_9" ] ), typetblA"string_12" ] ), typetblA"function_13" ] ), typetblA[  "set_2" ] ), typetblA[  "polynomial_10"  ]), typetblA[  "matrix"  ]), typetblA[  "vector"  ]), typetblA
[
enterreturns

Xcas
:
realintegercomplexidentifiervectorexpressionrationalstringfuncvectorvectorvectorvectorDOM_MAP

hpprime
:
DOM_FLOATDOM_INTDOM_COMPLEXDOM_IDENTDOM_LISTDOM_SYMBOLICDOM_RATDOM_STRINGDOM_FUNC,DOM_LISTDOM_LISTDOM_LISTDOM_LISTDOM_MAP


typetblA"float_1" ] ), typetblA"integer_2" ] ), typetblA"complex_4" ] ), typetblA"identifier_6" ] ), typetblA"list_7" ] ), typetblA"symbolic_8" ] ), typetblA"rational_9" ] ), typetblA"string_12" ] ), typetblA"function_13" ] ), typetblA[  "set_2" ] ), typetblA[  "polynomial_10"  ]), typetblA[  "matrix"  ]), typetblA[  "vector"  ]), typetblA)  ] .+ 0
[enterreturns
[1,2,4,6,7,8,10,12,13,7,7,7,7,17]


tblA"list_7" ][0] [enterreturns
9

tblA
"list_7" ][[1]] [enterreturns

Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
table data - compsystems - 02-22-2019 12:23 AM
RE: table() data - toml_12953 - 02-22-2019, 04:00 PM
RE: table() data - compsystems - 02-22-2019, 07:33 PM



User(s) browsing this thread: 1 Guest(s)