Git Product home page Git Product logo

Comments (4)

BertJorissen avatar BertJorissen commented on June 19, 2024 1

just put z=y*0 ;)

from pybinding.

yangxing844 avatar yangxing844 commented on June 19, 2024

it seems that you need z argument to make it work even though I don't make use of z since this is 2d

from pybinding.

BertJorissen avatar BertJorissen commented on June 19, 2024

Hi Yang,
In Python, you can set the specific variable of a function by function(var1=1.). If you leave out a variable in a function that has a default variable in the definition (for example def function(var1, var2=0.) and only calling function(var1=1) it will automatically set var2=0..
On the API for the shape.contains I can see that there isn't a default value for the z-component. I'll maybe add this as zero in a next release. So, for now, just add something in the z-component.
Best
Bert

from pybinding.

yangxing844 avatar yangxing844 commented on June 19, 2024

Hi Yang, In Python, you can set the specific variable of a function by function(var1=1.). If you leave out a variable in a function that has a default variable in the definition (for example def function(var1, var2=0.) and only calling function(var1=1) it will automatically set var2=0.. On the API for the shape.contains I can see that there isn't a default value for the z-component. I'll maybe add this as zero in a next release. So, for now, just add something in the z-component. Best Bert

but we don't know how long the zero array should be, so we really can not set a default value for this kind of parameter? maybe address it in the API documentation is nice

from pybinding.

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.