Issue 1:
Hello,

first, thank you for this amazing library ! :)

It is my first time reporting an issue, so please, feel free to let me know if anything is improper.

The code for reproducibility

import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd

a = [0,1,2]
b = [1,0,1]

df = pd.DataFrame({"a":a,"b":b})
print(df)

plt.figure(figsize=(10,10))
sns.lineplot(data=df, x='a', y='b')
plt.show()

this is the error I get

File ".../venv/lib/python3.10/site-packages/numpy/ma/core.py", line 2360, in masked_invalid
return masked_where(~(np.isfinite(getdata(a))), a, copy=copy)
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

And finally, here is how I came around it : numpy/ma/core.py

def getdata(a, subok=True):
"""
[...]
"""
try : # added this
data = a.to_numpy() # added this
except AttributeError: # added this
try:
data = a._data
except AttributeError:
data = np.array(a, copy=False, subok=subok)
if not subok:
return data.view(ndarray)
return data

the code was originally

try:
data = a._data
except AttributeError:
data = np.array(a, copy=False, subok=subok)
if not subok:
return data.view(ndarray)
return data

Before modifying the getdata function, I tried reinstalling seaborn, numpy, and matplotlib. But nothing worked.

It now works.

Hoping this can be of some help !

Please, let me know if any information is missing.

requirements.txt

contourpy==1.0.6

cycler==0.11.0

fonttools==4.38.0

geomloss==0.2.5

kiwisolver==1.4.4

matplotlib==3.6.2

networkx==2.8.8

numpy==1.24.0

nvidia-cublas-cu11==11.10.3.66

nvidia-cuda-nvrtc-cu11==11.7.99

nvidia-cuda-runtime-cu11==11.7.99

nvidia-cudnn-cu11==8.5.0.96

packaging==22.0

pandas==1.5.2

Pillow==9.3.0

POT==0.8.2

pyparsing==3.0.9

PyQt5==5.15.7

PyQt5-Qt5==5.15.2

PyQt5-sip==12.11.0

PyQt6==6.4.0

PyQt6-Qt6==6.4.1

PyQt6-sip==13.4.0

python-dateutil==2.8.2

pytz==2022.7

scipy==1.9.3

seaborn==0.12.1

six==1.16.0

sklearn==0.0.post1

tk==0.1.0

torch==1.13.1

tqdm==4.64.1

typing_extensions==4.4.0

system information

Python: Python 3.10.9

Kernel: 5.15.0-56-generic x86_64

bits: 64

Desktop: Gnome 3.36.9

Distro: Ubuntu 20.04.5 LTS (Focal Fossa)

Issue 2:
This is the code that I ran

import matplotlib.pyplot as plt
import seaborn as sns

fmri = sns.load_dataset("fmri")
fmri.info()

sns.set(style="darkgrid")
sns.lineplot(data=fmri, x="timepoint", y="signal", hue="region", style="event")

plt.show()

This is the error I got

❯ python3 example.py
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 1064 entries, 0 to 1063
Data columns (total 5 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 subject 1064 non-null object
1 timepoint 1064 non-null int64
2 event 1064 non-null object
3 region 1064 non-null object
4 signal 1064 non-null float64
dtypes: float64(1), int64(1), object(3)
memory usage: 41.7+ KB
Traceback (most recent call last):
File "/home/rizwan/Downloads/Seaborn-Issue/example.py", line 8, in <module>
sns.lineplot(
File "/home/rizwan/Miniconda3/envs/py39/lib/python3.9/site-packages/seaborn/relational.py", line 645, in lineplot
p.plot(ax, kwargs)
File "/home/rizwan/Miniconda3/envs/py39/lib/python3.9/site-packages/seaborn/relational.py", line 489, in plot
func(
File "/home/rizwan/Miniconda3/envs/py39/lib/python3.9/site-packages/matplotlib/__init__.py", line 1423, in inner
return func(ax, *map(sanitize_sequence, args), **kwargs)
File "/home/rizwan/Miniconda3/envs/py39/lib/python3.9/site-packages/matplotlib/axes/_axes.py", line 5367, in fill_between
return self._fill_between_x_or_y(
File "/home/rizwan/Miniconda3/envs/py39/lib/python3.9/site-packages/matplotlib/axes/_axes.py", line 5272, in _fill_between_x_or_y
ind, dep1, dep2 = map(
File "/home/rizwan/Miniconda3/envs/py39/lib/python3.9/site-packages/numpy/ma/core.py", line 2360, in masked_invalid
return masked_where(~(np.isfinite(getdata(a))), a, copy=copy)
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

Environment

Python 3.9.15

Seaborn 0.12.1

Matplotlib 3.6.2

Pandas 1.5.2

Numpy 1.24.0

This error only occurs when I use numpy 1.24.0, version 1.23.5 or lower works as usual.