Ricardo Vieira

Results 297 issues of Ricardo Vieira

### Description Brought up in https://github.com/pymc-devs/pytensor/pull/858 ```python import pytensor import pytensor.tensor as pt a = pt.matrix("a", shape=(200, 300)) b = pt.matrix("b", shape=(300, 400)) dot = (a[:, :, None] * b).sum(1)...

graph rewriting

### Description Functions like `scipy.special.psi` now always upcast to float64, even if the input is a low precision integer like `int8`. We need to handle these types, but: 1) float64...

SciPy compatibility

### Description Brought up in #846 ```python import pytensor import pytensor.tensor as pt x = pt.vector("x", dtype="int64") out = pt.special.softmax(x) # Doesn't seem right out.dprint(print_type=True) # Softmax{axis=None} [id A] #...

bug
Op implementation

### Description It's rather hard to find what functions are available in PyTensor (like do we have anything for linalg?). We should get sphinx to auto-populate most things with the...

docs

https://github.com/pymc-devs/pytensor/blob/d3bd1f15a497c05a979a8e3e8be40883f669a0b6/pytensor/link/jax/dispatch/elemwise.py#L72-L89 The JAX docs of lax.reshape (which np.reshape uses) suggest this may be better for further optimizations: https://jax.readthedocs.io/en/latest/_autosummary/jax.lax.reshape.html#jax.lax.reshape Relevant part: > For inserting/removing dimensions of size 1, prefer using lax.squeeze...

beginner friendly
jax

### Description With static types it is possible to find out cases where we know the reshape is useless at compile time. We should remove it when that's the case....

graph rewriting

### Description Or have rewrites that handle this case. Otherwise it's hard / impossible to use Sparse variables in Blockwise/RandomVariables that have other batched inputs, but would otherwise work fine...

sparse variables

### Description AdvancedSubtensor1 and AdvancedIncSubtensor1 are specializations of AdvancedSubtensor and AdvancedIncSubtensor that only allow one vector of integer indexing along the first dimension. They exist to provide a C-implementation of...

backend compatibility
graph rewriting

`dvector` hardcodes `shape=(None,)`. Would be nicer to make it a partial of `vector` with the fixed dtype to still allow providing a specific static shape if the user wants to...

beginner friendly

https://github.com/pymc-devs/pytensor/blob/5d4b0c4b9a1e478dda48e912ee708a9e557e9343/pytensor/tensor/random/basic.py#L897-L903 It is not allowed to broadcast with mu so it should be aware of its shape. And should probably be eye(mu.shape[-1]), not ones. Or we can just remove it,...

beginner friendly
maintenance
random variables