Jack Lovell

Results 54 comments of Jack Lovell

I like this idea. The reason I didn't implement it originally with ArgXD is that Python operator precedence reduces its usefulness somewhat, compared with autowrapping constants. For example, `Exp1D(5 *...

Another possibility would be to make some aliases. e.g. for Function3D: ```python X3 = Arg3D('x') Y3 = Arg3D('y') Z3 = Arg3D('z') ``` Then a user could do: ```python from raysect.core.math.function.float...

Recent Cython alpha releases have fixed the hang. `2 * f` in the above example now fails immediately with a `TypeError`: ```python >>> 2 * f Traceback (most recent call...

If `sqrt`, `exp` etc. are considered not general enough for raysect, they could always live in `cherab.core.math.function` as utility functions. I think `__pow__` should at least be added to raysect...

OK, I'm happy to add `__pow__` and the building block functions. I'll add all of the above building blocks and `ConstantxD` to the bottom of the corresponding `functionxd.pyx` files, if...

Sounds good. I'll leave `ConstantxD` in `functionxd.pyx`, as it'll be needed to replace the `*Scalar` classes, but move all the building blocks into separate files. They'll be arranged by dimension,...

@CnlPepper > Can we please be careful about "taking" code from cherab and attempting to add it to raysect. Cherab's license is not compatible with Raysect's when moving upstream. Any...

> xD equality operators - these return 0.0 or 1.0 depending on the evaluation. Can be use to build masks. I've implemented the equality operators, along with other rich comparison...

You shouldn't be using these classes directly. They're automatically returned when building expressions. For example, `f = Sin1D(Arg1D()) * 3` will return a `MultiplyScalar1D` object, as the result of a...

+1 for this, though I would vote for `__repr__` looking like your first code block, and having an additional `__str__` for your second block. Then you could directly copy and...