crosscat icon indicating copy to clipboard operation
crosscat copied to clipboard

pls help run on windows 10 machine with anaconda python 2.7

Open Sandy4321 opened this issue 8 years ago • 3 comments

the error is

c:\Sander\my_code\crosscat-master> c:\Sander\my_code\crosscat-master>python examples/dha_example.py www/data/dha.csv --num_chains 2 --num_transitions 2 Traceback (most recent call last): File "examples/dha_example.py", line 78, in X_L_list, X_D_list = engine.initialize(M_c, M_r, T, get_next_seed(), initialization='from_the_prior', n_chains=num_chains) File "C:\Anaconda\lib\site-packages\crosscat\LocalEngine.py", line 110, in initialize make_get_next_seed(seed), File "C:\Anaconda\lib\site-packages\crosscat\LocalEngine.py", line 62, in get_initialize_arg_tuples seeds = [get_next_seed() for seed_idx in range(n_chains)] File "C:\Anaconda\lib\site-packages\crosscat\LocalEngine.py", line 908, in return lambda: generator.next() File "C:\Anaconda\lib\site-packages\crosscat\utils\general_utils.py", line 95, in int_generator for _ in xrange(2**62): OverflowError: Python int too large to convert to C long

c:\Sander\my_code\crosscat-master>

Sandy4321 avatar Jun 16 '16 18:06 Sandy4321

Hi, Sandy. As a temporary workaround, try editing line 95 of C:\Anaconda\lib\site-packages\crosscat\utils\general_utils.py so that the argument to xrange is 2**31, or perhaps a smaller value.

alxempirical avatar Jun 16 '16 18:06 alxempirical

Why not just change for _ in xrange(2**62) to while True?

riastradh-probcomp avatar Jun 16 '16 18:06 riastradh-probcomp

You're right, that's a better solution. Can't remember why I wrote it that way.

alxempirical avatar Jun 16 '16 19:06 alxempirical