# Same specified synthetic example as R; no finite ML slope exists.
import numpy as np
from scipy.special import log_expit
x=np.array([-3.,-2.,-1.,1.,2.,3.])
y=(x>0).astype(int)
for b in [1,2,5,10]:
    ll=np.sum(np.where(y==1,log_expit(b*x),log_expit(-b*x)))
    print(f"slope={b} loglik={ll:.6f}")
assert np.all(x[y==0]<0) and np.all(x[y==1]>0)
