Re: [sage-support] Out of memory error when dividing vector by scalar

2012-07-27 Thread Daniel Smertnig
Indeed, the problem seems to still be present in 5.2rc1. I've tracked the call to basis() back to an inefficient implementation of gen() in FreeModule_ambient (apparently the coercion framework ends up calling an_element() which in turn ends up calling gen()). It seems easy enough to fix. I

[sage-support] Out of memory error when dividing vector by scalar

2012-07-26 Thread Kyle Schalm
I'm using sage 4.6.1 (release data 2011-01-11) on Linux. When I tried to divide a vector of ~1 elements by a scalar, it ran out of system memory and crashed. code: n = 1 v = vector([0]*n) # ok so far v2 = v/1 # kaboom I repeated this process for increasing values of n

Re: [sage-support] Out of memory error when dividing vector by scalar

2012-07-26 Thread D. S. McNeil
After some digging -- and a fortuitous control-C at the right moment -- it looks like it's trying to construct the basis for the ambient free module. This will be a list of 10^4 vectors, each 10^4 elements long, so it's not surprising it takes a lot of memory.. adding a print statement in the