Ask Your Question

Revision history [back]

I can't see all the code, so I'm not sure exactly what's going on. But this particular line looks like a red flag:

 for vector in CoefficientsforSpan:

In that loop, you replaced the standard function vector() with a new variable vector. This wasn't a problem in that loop. However, the next time you tried to call the vector() function to build a new vector, it tried to use the previous vector variable instead. And that variable was an actual vector, not a function, so the error message you are seeing is just telling you that you can't call it.

Change the name of vector in that loop, and it might fix your problem. You might need to reload the notebook to fix the vector function. I can't seem to find which module it's loaded from, or I'd give you the import command to fix it.

I can't see all the code, so I'm not sure exactly what's going on. But this particular line looks like a red flag:

 for vector in CoefficientsforSpan:

In that loop, you replaced the standard function vector() with a new variable vector. This wasn't a problem in that loop. However, the next time you tried to call the vector() function to build a new vector, it tried to use the previous vector variable instead. And that variable was an actual vector, not a function, so the error message you are seeing is just telling you that you can't call it.

Change the name of vector in that loop, and it might fix your problem. You might need to reload the notebook to fix the vector function. I can't seem to find which module it's loaded from, or I'd give you the import command to fix it.

Edit: I just noticed, even further up in the code, you used vector as a variable. You'll need to use a different variable name. The code in question:

vector=NewMatrix.solve_left(Quotient[i])
CoefficientsforSpan.append(vector)

I can't see all the code, so I'm not sure exactly what's going on. But this particular line looks like a red flag:

 for vector in CoefficientsforSpan:

In that loop, you replaced the standard function vector() with a new variable vector. This wasn't a problem in that loop. However, the next time you tried to call the vector() function to build a new vector, it tried to use the previous vector variable instead. And that variable was an actual vector, not a function, so the error message you are seeing is just telling you that you can't call it.

Change the name of vector in that loop, and it might fix your problem. You might need to reload the notebook to fix the vector function. I can't seem to find which module it's loaded from, or I'd give you the import command to fix it.it. (Update: found it: from sage.modules.free_module_element import vector)

Edit: I just noticed, even further up in the code, you used vector as a variable. You'll need to use a different variable name. The code in question:

vector=NewMatrix.solve_left(Quotient[i])
CoefficientsforSpan.append(vector)