## Finding cartesian product with PHP associative arrays

Say that I have an array like the following:

Say that I have an array like the following:

I want to create product option system. I have a form look like this:

I have a class structure like so:

How can I get the Cartesian product (every possible combination of values) from a group of lists?

I have two pandas dataframes:

I have two numpy arrays that define the x and y axes of a grid. For example:

I’m trying to run over the parameters space of a 6 parameter function to study its numerical behavior before trying to do anything complex with it, so I’m searching for an efficient way to do this.

Given multiple list of possibly varying length, I want to iterate over all combinations of values, one item from each list. For example: first = [1, 5, 8] second = [0.5, 4] Then I want the output of to be: combined = [(1, 0.5), (1, 4), (5, 0.5), (5, 4), (8, 0.5), (8, 4)] I … Read more

I would like a list of 2d NumPy arrays (x,y) , where each x is in {-5, -4.5, -4, -3.5, …, 3.5, 4, 4.5, 5} and the same for y.