Ask Your Question

Revision history [back]

This is because of the difference between the "repr" (a convenient representation) and the "str" (the full string).

If you only want it displayed:

print(mylist)

If you want the string returned:

str(mylist)

This is because of the difference between the "repr" (a convenient representation) and the "str" (the full string).

If you only want it displayed:

print(mylist)

If you want the string returned:

str(mylist)

The output of multifractal_cascade_random_walk_simulation is a list of "time series" whose "repr" and "str" include ... when the time series get long enough.

To turn it into a list of lists:

aa = [list(r) for r in a]
print(aa)

To turn it into a matrix:

m = matrix(a)
print(m)

To use custom printing (e.g limit each entry to 6 characters):

print(m.str(rep_mapping=lambda x: str(x)[:6]))

For a graphical representation rendering each entry as a square whose darkness reflects the entry's value:

matrix_plot(a)

This is because of the difference between the "repr" (a convenient representation) and the "str" (the full string).

If you only want it displayed:

print(mylist)

If you want the string returned:

str(mylist)

The output of multifractal_cascade_random_walk_simulation is a list of "time series" whose "repr" and "str" include ... when the time series get long enough.

To turn it into a list of lists:

aa = [list(r) for r in a]
print(aa)

To turn it into a matrix:

m = matrix(a)
print(m)

To use custom printing (e.g limit each entry to 6 characters):

print(m.str(rep_mapping=lambda x: str(x)[:6]))

For a graphical representation rendering each entry as a square whose darkness reflects the entry's value:

matrix_plot(a)