Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

spreizer_test.py 532 B

12345678910111213141516171819202122
  1. import numpy as np
  2. import pylab as pl
  3. import noise
  4. nrow = 100
  5. size = 4
  6. x = y = np.linspace(0, size, nrow)
  7. n = [[noise.pnoise2(i, j, repeatx=size, repeaty=size) for j in y] for i in x]
  8. m = np.concatenate(n)
  9. sorted_idx = np.argsort(m)
  10. max_val = nrow * 2
  11. idx = len(m) // max_val
  12. for ii, val in enumerate(range(max_val)):
  13. m[sorted_idx[ii * idx:(ii + 1) * idx]] = val
  14. landscape = (m - nrow) / nrow
  15. pl.hist(landscape, bins=np.arange(-1, 1.01, 0.01))
  16. pl.matshow(landscape.reshape(nrow, -1), vmin=-1, vmax=1)
  17. pl.colorbar()
  18. pl.show()