Skip to content
Discussion options

You must be logged in to vote

Assuming 1D matrices

a = []
a[end+1] = 10
a # [10]
a.resize([a.size()[1]-1])
a # []

And you could import your own push and pop functions.

math.import({
  push: (m, v) => {m.set([m.size()[0]], v)},
  pop: (m) => {m.resize([m.size()[0]-1])}
})
a = []
push(a, 10)
a # [10]
pop(a)
a # []

Replies: 3 comments 1 reply

Comment options

dvd101x
Oct 11, 2025
Collaborator Sponsor

You must be logged in to vote
0 replies
Comment options

dvd101x
Oct 11, 2025
Collaborator Sponsor

You must be logged in to vote
1 reply
@herdrick
Comment options

Answer selected by herdrick
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants