Loss of functionality in .54 - change in slicing behavior on user defined types
See original GitHub issuepossible dupe of : https://github.com/numba/numba/issues/7355 The following code worked prior to 0.54, but no longer will run:
import numpy as np
import numba as nb
ALT_TYPE = [('Z', np.float64, 3)]
np_alt = np.dtype(ALT_TYPE, align=True)
nb_alt = nb.from_dtype(np_alt)
print(np_alt)
print(nb_alt)
@nb.njit(nb.void(nb_alt[:]))
def new_kern(z):
z[0]['Z'][:] = 7
dta = np.zeros((1,), dtype=nb_alt)
new_kern(dta)
print(dta)
Yields:
No implementation of function Function(<built-in function setitem>) found for signature:
>>> setitem(nestedarray(float64, (3,)), slice<a:b>, Literal[int](7))
There are 16 candidate implementations:
- Of which 14 did not match due to:
Overload of function 'setitem': File: <numerous>: Line N/A.
With argument(s): '(nestedarray(float64, (3,)), slice<a:b>, int64)':
No match.
- Of which 2 did not match due to:
Overload in function 'SetItemBuffer.generic': File: numba\core\typing\arraydecl.py: Line 171.
With argument(s): '(nestedarray(float64, (3,)), slice<a:b>, int64)':
Rejected as the implementation raised a specific error:
TypeError: __init__() got an unexpected keyword argument 'ndim'
Expected behavior:
[([7,7,7],)]
The bug affects CUDA as well but this is probably incidental.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Rating Motivational Interviewing Fidelity from Thin Slices - NCBI
Monitoring fidelity to psychosocial treatments is critical to dissemination, process and outcome research, and internal validity in efficacy ...
Read more >(PDF) Thin Slices of Behavior as Cues of Personality and ...
Personality inferences from thin slices of behavior were significantly associated with reports by knowledgeable informants.
Read more >Detecting Psychopathy From Thin Slices of Behavior
Because of psychopathic individuals' lack of insight into their maladaptive personality features, they may possess blind spots that may be better described.
Read more >Sliced Inverse Regression for Dimension Reduction
Furthermore, we use a simple step function to estimate the inverse regression curve. ... regression curve E(x I y), which is the slice...
Read more >SPRED2 loss-of-function causes a recessive Noonan ...
pressing wild-type SPRED2 but not the SPRED2Leu381Hisfs*95 protein. ... behavioral anomalies, skeletal and skin features, as well.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Closing now as #7428 was merged!
Great, thank you!