0

Need to know what these Numbers in np.random.seed(19680801) mean, when you use it for Color.

Here is an example: https://matplotlib.org/gallery/lines_bars_and_markers/scatter_masked.html#sphx-glr-gallery-lines-bars-and-markers-scatter-masked-py

tory
  • 55
  • 1
  • 7

1 Answers1

1

A seed in a random generator ensures that the pseudo-random data that is generated will be the same for the next experiment. This is used to be able to replicate experiments with "random" data.

The seed is usually given as a number, in this case the authors chose the number 19680801 as a number.

Thijs van Ede
  • 861
  • 6
  • 15
  • @ Thijs van Ende :-) I believe the number has a meaning. I finally found an explanation of this. It is RGB, which was converted into Decimal. If i use this [Color Weel](https://color.adobe.com) and choose a particular color, i take Hex number of it, then convert into Decimal, as np.random.seed requires Int. Here is also useful Information about [RGB into Decimal Converter](https://stackoverflow.com/questions/25404998/how-can-i-convert-an-rgb-input-into-a-decimal-color-code). – tory Sep 07 '18 at 17:06
  • @tory The number `19680801` is possibly the birthday of the code author (or other sort of memorable date), August 1st 1968. It's a sort of underground convention for seeding a RNG. – gboffi Sep 07 '18 at 19:39