bugGNU Octave - Bugs: bug #56515, griddatan errors when querying...


bug #56515: griddatan errors when querying with only one valid point

Submitted by:  Gerrit <gerrit0>
Submitted on:  Tue 18 Jun 2019 03:13:22 AM UTC  
Category:  Octave Function Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 12 Jul 2019 03:19:54 AM UTC, comment #2: 

The patch for bug #45542 has been applied which also resolves this report.

Marking as fixed and closing.

Rik <rik5>
Project Administrator
Tue 18 Jun 2019 07:03:03 AM UTC, comment #1: 

Thank you for the bug report.  I noticed, that Matlab R2019a errors for your example as well:

Error using builtin
QH6154 qhull precision error: initial facet 1 is coplanar with the interior point

While executing:  | qhull d Qt Qbb Qc
Options selected for Qhull 2010.1 2010/01/14:
  run-id 1522627653  delaunay  Qtriangulate  Qbbound-last  Qcoplanar-keep
  _pre-merge  _zero-centrum  Qinterior-keep  Pgood  _max-width  1
  Error-roundoff 1.4e-15  _one-merge 9.7e-15  Visible-distance 2.8e-15
  U-coplanar-distance 2.8e-15  Width-outside 5.5e-15  _wide-facet 1.7e-14

The input to qhull appears to be less than 3 dimensional, or a
computation has overflowed.

Qhull could not construct a clearly convex simplex from points:

The center point is coplanar with a facet, or a vertex is coplanar
with a neighboring facet.  The maximum round off error for
computing distances is 1.4e-15.  The center point, facets and distances
to the center point are as follows:

facet p1 p2 p0 distance=    0
facet p3 p2 p0 distance=    0
facet p3 p1 p0 distance=    0
facet p3 p1 p2 distance=    0

These points either have a maximum or minimum x-coordinate, or
they maximize the determinant for k coordinates.  Trial points
are first selected from points that maximize a coordinate.

The min and max coordinates for each dimension are:
  0:         0         1  difference=    1
  1:         0         1  difference=    1
  2:         0         1  difference=    1

If the input should be full dimensional, you have several options that
may determine an initial simplex:
  - use 'QJ'  to joggle the input and make it full dimensional
  - use 'QbB' to scale the points to the unit cube
  - use 'QR0' to randomly rotate the input for different maximum points
  - use 'Qs'  to search all points for the initial simplex
  - use 'En'  to specify a maximum roundoff error less than 1.4e-15.
  - trace execution with 'T3' to see the determinant for each point.

If the input is lower dimensional:
  - use 'QJ' to joggle the input and make it full dimensional
  - use 'Qbk:0Bk:0' to delete coordinate k from the input.  You should
    pick the coordinate with the least range.  The hull will have the
    correct topology.
  - determine the flat containing the points, rotate the points
    into a coordinate plane, and delete the other coordinates.
  - add one or more points to make the input full dimensional.

This is a Delaunay triangulation and the input is co-circular or co-spherical:
  - use 'Qz' to add a point "at infinity" (i.e., above the paraboloid)
  - or use 'QJ' to joggle the input and avoid co-circular data

Error in qhullmx

Error in delaunayn (line 101)
t = qhullmx(x', 'd ', opt);

Error in griddatan>linear (line 105)
  tri = delaunayn(x);

Error in griddatan (line 89)
        yi = linear(x,y,xi,opt);

Thus this item should be treated as feature request.

But I can confirm, that the three line patch of bug #45542 fixes the original problem.  We should concentrate on bug #45542 and fix this item as "side effect".

Kai Torben Ohlhus <siko1056>
Project Member
Tue 18 Jun 2019 03:13:22 AM UTC, original submission:  

When providing only one query point, or multiple query points with only one query point inside the generated convex hull, the call to griddatan will fail.


x = [ 0, 0; 1, 1; 0, 1; 1, 0 ]
y = [ 1; 2; 3; 4 ]
xi = [ .5, .5 ]
griddatan(x, y, xi)

The last line will produce the error

error: griddatan: =: nonconformant arguments (op1 is 1x1, op2 is 3x1)
error: called from
    griddatan at line 84 column 15

The patch provided by Juho in bug #45542 appears to fix this simple case, but I haven't tested it in more complicated ones.

Gerrit <gerrit0>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


   bug dependencies.

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by gerrit0 (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-07-12 rik5 StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
        Release5.1.0 => dev
    2019-06-18 siko1056 Dependencies- => Depends on bugs #45542
    2019-06-18 siko1056 Severity3 - Normal => 1 - Wish
        Priority5 - Normal => 3 - Low
        Item GroupUnexpected Error => Feature Request
        StatusNone => Patch Submitted

    Back to the top

    Powered by Savane 3.5