[sage-support] Re: ValueError when using np.random.seed()

2011-10-26 Thread Jason Grout
On 10/26/11 2:41 PM, Jose Guzman wrote: Hi everybody, When trying to set a seed in Sage: sage: import numpy as np sage: np.random.seed(10) I've got the following error: sage: np.random.seed(10) --- ValueError Traceback

Re: [sage-support] Re: ValueError when using np.random.seed()

2011-10-26 Thread D. S. McNeil
thread hijack but not really Most likely, the problem here is that numpy doesn't recognize Sage Integer objects as being convertable to python integers.  I think this is a failing of numpy (it should check the __index__ method to see if it can convert the Integer to a python integer).

[sage-support] Re: ValueError when using np.random.seed()

2011-10-26 Thread Jason Grout
On 10/26/11 4:20 PM, D. S. McNeil wrote: thread hijack but not really Most likely, the problem here is that numpy doesn't recognize Sage Integer objects as being convertable to python integers. I think this is a failing of numpy (it should check the __index__ method to see if it can convert

[sage-support] Re: ValueError when using np.random.seed()

2011-10-26 Thread Jason Grout
On 10/26/11 4:20 PM, D. S. McNeil wrote: thread hijack but not really Most likely, the problem here is that numpy doesn't recognize Sage Integer objects as being convertable to python integers. I think this is a failing of numpy (it should check the __index__ method to see if it can convert