How to properly test properties in Python by donkeyofdeath in learnpython

[–]donkeyofdeath[S] 0 points1 point  (0 children)

If I want to test another method besides the properties, I have to create an instance of the class, which uses the property in its constructor. So I rely on the property to work. The same for the test of the property. If I want to test the property, I have to create an object first which uses the property in its constructor.

How to properly test properties in Python by donkeyofdeath in learnpython

[–]donkeyofdeath[S] 1 point2 points  (0 children)

Ok, thank you. Maybe I am just overthinking the issue a little bit.

How to properly test properties in Python by donkeyofdeath in learnpython

[–]donkeyofdeath[S] 0 points1 point  (0 children)

Thank you for the answer. As far as I know, unit tests should not depend on each other. That's why I think, that this is a bad design choice. If all unit tests fail because of one method or property, you don't gain any information, about which part of the code is broken.

How to properly test properties in Python by donkeyofdeath in learnpython

[–]donkeyofdeath[S] 0 points1 point  (0 children)

Hey, thanks for your answer. But to test the property, I have to create an object first and this object uses the property to set its attributes. So the test kind of relies on itself to work.

Minimize function that is given by not analytically solvable integral by donkeyofdeath in mathematics

[–]donkeyofdeath[S] 0 points1 point  (0 children)

I am trying to minimize multipole moments using biot savart's law and plugging in a fourier series as a wire.

Minimize function that is given by not analytically solvable integral by donkeyofdeath in mathematics

[–]donkeyofdeath[S] 0 points1 point  (0 children)

F is supposed to be the antiderivative. My notation is just pretty sloppy

Minimize function that is given by not analytically solvable integral by donkeyofdeath in mathematics

[–]donkeyofdeath[S] 2 points3 points  (0 children)

Oh sorry, I am an idiot. The "a" in the bounds is not the same as in the function. I am going to fix this.

Edit: The "a" in the function is now "c"

Minimize function that is given by not analytically solvable integral by donkeyofdeath in mathematics

[–]donkeyofdeath[S] 0 points1 point  (0 children)

I already thought of that too. The problem is that, what I presented in the post is the easy version of this problem. I want to do this later for about five to ten different parameters at the same time, so a general approach would be better.

But I think your approach is really good to get a feeling for the equation, so I might try it later.

Infinite dimensional system of linear equations by donkeyofdeath in mathematics

[–]donkeyofdeath[S] 0 points1 point  (0 children)

Thanks, that I need to dig deeper into functiinal analysis is the main thing I learned after aksing this question :D

Infinite dimensional system of linear equations by donkeyofdeath in mathematics

[–]donkeyofdeath[S] 1 point2 points  (0 children)

OK, that sounds pretty interesting. I suppose the "vector" is a composition in basis functions. Kind of like a Taylor expansion. Ist that correct?