7

Bug introduced in 10.2.0 and fixed in 10.3.1.
RandomPoint is new in 10.2.0.


I have defined a simple ellipsoidal parametric region:

With[{a = 10, b = 7, c = 1.5},
  ℛ = ParametricRegion[{a Cos[u] Cos[v], b Cos[u] Sin[v], c Sin[u]},
  {{u, -π/2, π/2}, {v, -π, π}}]
];

I would then like to generate some (thousands) of random points inside this region. However, RandomPoint[ℛ, n] fails if n is 152 or larger (determined with trial & error).

pts = RandomPoint[ℛ, 152];
Function::flpar: Parameter specification {Statistics`RandomNumberGenerationDump`x$138799[1],
    Statistics`RandomNumberGenerationDump`x$138799[2]}
  in Function[{Statistics`RandomNumberGenerationDump`x$138799[1],
    Statistics`RandomNumberGenerationDump`x$138799[2]},2.1298 (1-<<46>>[1])^2
      Statistics`RandomNumberGenerationDump`x$138799[1] (1-
        Statistics`RandomNumberGenerationDump`x$138799[2])^3+<<11>>+1.91753 <<1>>^3 <<
      1>>^3] should be a symbol or a list of symbols. >>

Is this a bug? I'm using Mathematica 10.3.0 on Xubuntu Linux 15.10.

Update: The behavior is random seed-dependent. For example, with SeedRandom[4], I get no errors. With 1, 2, 3 or 5, I do.

With the code

Monitor[Do[Check[RandomPoint[ℛ, n], Print[n]], {n, 5, 200}], n]

the smallest n which fails is so far 14.

Update 2: After some more testing, I believe it can fail with any n.

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
shrx
  • 7,807
  • 2
  • 22
  • 55

1 Answers1

4

The bug appears to be fixed in the latest version of Mathematica (10.3.1), as confirmed by @JasonB and @Szabolcs.

shrx
  • 7,807
  • 2
  • 22
  • 55