# ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

- **ID:** `python/pytest-parametrize-list-mutation`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Passing a numpy array as a parameter to a parametrized test without converting it to a list, causing ambiguity in truth testing.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   @pytest.mark.parametrize('arr', [np.array([1,2]).tolist()])
   ```
2. **** (90% success)
   ```
   def id_func(arr):
    return f'arr_{len(arr)}'
@pytest.mark.parametrize('arr', [np.array([1,2])], ids=id_func)
   ```

## Dead Ends

- **** — Pytest may still try to evaluate the array's truth value. (80% fail)
- **** — This changes the data type and may break the test logic. (60% fail)
