Coder Social home page Coder Social logo

Comments (4)

andfoy avatar andfoy commented on June 2, 2024 1

This issue is not related to #20619, since it is not related to concurrency. However, I can reproduce it, which implies that some other kind of error is occurring, I can further investigate this one.

from scipy.

AtsushiSakai avatar AtsushiSakai commented on June 2, 2024 1

In the interpolate case, the LinearNDInterpolator is using the qhull.Delaunay in its initializer.

def _calculate_triangulation(self, points):
self.tri = qhull.Delaunay(points)

In the latest code, I have confirmed that using the code reported in this issue does not cause a segmentation fault, thanks to the validation introduced in PR #20633:

In [1]: import numpy as np

In [2]: from scipy.interpolate import LinearNDInterpolator

In [3]: LinearNDInterpolator(np.random.randn(4, 10, 3), np.random.randn(10))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[3], line 1
----> 1 LinearNDInterpolator(np.random.randn(4, 10, 3), np.random.randn(10))

File interpnd.pyx:326, in scipy.interpolate.interpnd.LinearNDInterpolator.__init__()

File interpnd.pyx:92, in scipy.interpolate.interpnd.NDInterpolatorBase.__init__()

File interpnd.pyx:330, in scipy.interpolate.interpnd.LinearNDInterpolator._calculate_triangulation()

File _qhull.pyx:1808, in scipy.spatial._qhull.Delaunay.__init__()

ValueError: Input points array must have 2 dimensions.

So, I think we can close this issue.

from scipy.

lucascolley avatar lucascolley commented on June 2, 2024

I see Qhull and segfault - @andfoy related to gh-20619, maybe?

from scipy.

tylerjereddy avatar tylerjereddy commented on June 2, 2024

As the cross-linked PR indicates, we just need to error out for the spatial cases since those are invalid inputs. I didn't touch the interpolate case, though it may or may not benefit from my patch if it passes through the same code path (didn't check).

from scipy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.