Opened 6 years ago

Closed 6 years ago

#17037 closed defect (fixed)

random_subposet does not use set_random_seed

Reported by: jmantysalo Owned by:
Priority: major Milestone: sage-6.4
Component: combinatorics Keywords:
Cc: ncohen Merged in:
Authors: Jori Mäntysalo Reviewers: Nathann Cohen
Report Upstream: N/A Work issues:
Branch: d6d8f05 (Commits) Commit: d6d8f051e8573882b2f3d91c96d04210474f9ee0
Dependencies: Stopgaps:

Description (last modified by jmantysalo)

For example

P=Poset({'a':['b']})
for i in range(1,10):
    set_random_seed(42)
    print P.random_subposet(0.5)

shows this behaviour. Should use sage.misc.prandom.

Change History (7)

comment:1 Changed 6 years ago by jmantysalo

  • Description modified (diff)

comment:2 Changed 6 years ago by jmantysalo

  • Branch set to u/jmantysalo/random_subposet_does_not_use_set_random_seed

comment:3 Changed 6 years ago by git

  • Commit set to d6d8f051e8573882b2f3d91c96d04210474f9ee0

Branch pushed to git repo; I updated commit sha1. New commits:

d6d8f05Arghs, again other code within same file. Corrected.

comment:4 Changed 6 years ago by jmantysalo

  • Authors set to Jori Mäntysalo
  • Status changed from new to needs_review

This was a simple fix.

comment:5 Changed 6 years ago by jmantysalo

  • Cc ncohen added

comment:6 Changed 6 years ago by ncohen

  • Reviewers set to Nathann Cohen
  • Status changed from needs_review to positive_review

comment:7 Changed 6 years ago by vbraun

  • Branch changed from u/jmantysalo/random_subposet_does_not_use_set_random_seed to d6d8f051e8573882b2f3d91c96d04210474f9ee0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.