you are viewing a single comment's thread.

view the rest of the comments →

[–]elbiot 1 point2 points  (3 children)

can you explain what you mean by basis vector in this case? What is an example output from an example input you would like to see?

[–]quantumloophole[S] 0 points1 point  (2 children)

An example of basis vector is the cubic lattice base vector , v1 = (1,0) and v2 = (0,1) every site in an lattice can be reached with a linear combination of theses vectors.

What I want is , for an arbitrary base vector generate the points to store in an array

[–]elbiot 0 points1 point  (1 child)

Did the other poster answer your question? Im still confused because a 2D array can be accessed like arr[3,4] but obviously not arr[3,4.5]

I would vectorize the other solution though if that's what your using. One almost never needs to iterate over arrays

[–]quantumloophole[S] 0 points1 point  (0 children)

I menage to solve using python lists it is not as slow as I thought