Skip to content

Crashing into HardFault_Handler with an empty array in argsort #6115

@silverman

Description

@silverman

CircuitPython version

Adafruit CircuitPython 7.2.0 on 2022-02-24; Adafruit Feather M4 Express with samd51j19

Code/REPL

from ulab import numpy as np
np.argsort(np.array([]), axis=0)

Behavior

The micro crashes into the HardFault_Handler:

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Crash into the HardFault_Handler.

Description

argsort works fine with a non-empty array. With an empty array, I suggest it'd be better to raise ValueError.

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugcrashulabRelated to the ulab module

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions