ImportError: numpy.core.multiarray when using `filter`
MEMBER
Could you please check your `numpy` version?
2024-07-16T08:05:21Z
https://github.com/huggingface/datasets/issues/7048#issuecomment-2230276645
https://api.github.com/repos/huggingface/datasets/issues/7048
IC_kwDODunzps6E71Il
https://api.github.com/repos/huggingface/datasets/issues/comments/2230276645/reactions
2024-07-16T08:05:21Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2230276645
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
NONE
I got this issue while using numpy version 2.0. 

I solved it by switching back to numpy 1.26.0 :) 
2024-07-16T08:17:58Z
https://github.com/huggingface/datasets/issues/7048#issuecomment-2230299374
https://api.github.com/repos/huggingface/datasets/issues/7048
IC_kwDODunzps6E76ru
https://api.github.com/repos/huggingface/datasets/issues/comments/2230299374/reactions
2024-07-16T08:17:58Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2230299374
https://avatars.githubusercontent.com/u/45195979?v=4
https://api.github.com/users/kamilakesbi/events{/privacy}
https://api.github.com/users/kamilakesbi/followers
https://api.github.com/users/kamilakesbi/following{/other_user}
https://api.github.com/users/kamilakesbi/gists{/gist_id}
https://github.com/kamilakesbi
kamilakesbi
MDQ6VXNlcjQ1MTk1OTc5
https://api.github.com/users/kamilakesbi/orgs
https://api.github.com/users/kamilakesbi/received_events
https://api.github.com/users/kamilakesbi/repos
https://api.github.com/users/kamilakesbi/starred{/owner}{/repo}
https://api.github.com/users/kamilakesbi/subscriptions
User
https://api.github.com/users/kamilakesbi
public
MEMBER
We recently added support for numpy 2.0, but it is not released yet.
2024-07-16T09:57:35Z
https://github.com/huggingface/datasets/issues/7048#issuecomment-2230496356
https://api.github.com/repos/huggingface/datasets/issues/7048
IC_kwDODunzps6E8qxk
https://api.github.com/repos/huggingface/datasets/issues/comments/2230496356/reactions
2024-07-16T09:57:35Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2230496356
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
NONE
Ok I see, thanks! I think we can close this issue for now as switching back to version 1.26.0 solves the problem :) 
2024-07-16T10:11:18Z
https://github.com/huggingface/datasets/issues/7048#issuecomment-2230524916
https://api.github.com/repos/huggingface/datasets/issues/7048
IC_kwDODunzps6E8xv0
https://api.github.com/repos/huggingface/datasets/issues/comments/2230524916/reactions
2024-07-16T10:11:18Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2230524916
https://avatars.githubusercontent.com/u/45195979?v=4
https://api.github.com/users/kamilakesbi/events{/privacy}
https://api.github.com/users/kamilakesbi/followers
https://api.github.com/users/kamilakesbi/following{/other_user}
https://api.github.com/users/kamilakesbi/gists{/gist_id}
https://github.com/kamilakesbi
kamilakesbi
MDQ6VXNlcjQ1MTk1OTc5
https://api.github.com/users/kamilakesbi/orgs
https://api.github.com/users/kamilakesbi/received_events
https://api.github.com/users/kamilakesbi/repos
https://api.github.com/users/kamilakesbi/starred{/owner}{/repo}
https://api.github.com/users/kamilakesbi/subscriptions
User
https://api.github.com/users/kamilakesbi
public
### Describe the bug

I can't apply the filter method on my dataset. 

### Steps to reproduce the bug

The following snippet generates a bug: 

```python
from datasets import load_dataset 

ami = load_dataset('kamilakesbi/ami', 'ihm')

ami['train'].filter(
    lambda example: example["file_name"] == 'EN2001a'
)
```

I get the following error: 

`ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use '<void>numpy._import_array' to disable if you are certain you don't need it).`

### Expected behavior

It should work properly! 

### Environment info

- `datasets` version: 2.20.0
- Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- `huggingface_hub` version: 0.23.4
- PyArrow version: 16.1.0
- Pandas version: 2.2.2
- `fsspec` version: 2024.5.0