Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: r_switch.bound_switch.<locals>.<lambda>() got an unexpected keyword argument 'self' #2

Open
Hibba2312 opened this issue Jun 6, 2023 · 1 comment

Comments

@Hibba2312
Copy link

  • latentcor version: 0.2.4
  • Python version: 3.10
  • Operating System: Ubuntu 20.04

Description

When running the following provided examples:

What I Did

simdata = gen_data(n = 100, tps = ["ter", "con"])
print(simdata['X'][ : 6, : ])

estimate = latentcor(simdata['X'], tps = ["ter", "con"])
print(estimate['R'])

#####The following error was obtained:

estimate = latentcor(simdata['X'], tps = ["ter", "con"])
print(estimate['R'])
Traceback (most recent call last):

  Cell In[14], line 1
    estimate = latentcor(simdata['X'], tps = ["ter", "con"])

  File ~/anaconda3/lib/python3.10/site-packages/latentcor/latentcor.py:509 in latentcor
    R_lower[comb_select] = r_switch.r_approx(self = r_switch, K = K, zratio1 = zratio1, zratio2 = zratio2, comb = comb, tol = tol, ratio  = ratio)

  File ~/anaconda3/lib/python3.10/site-packages/latentcor/latentcor.py:245 in r_approx
    bound = r_switch.bound_switch(self = r_switch, comb = comb, zratio1 = zratio1, zratio2 = zratio2).flatten()

  File ~/anaconda3/lib/python3.10/site-packages/latentcor/latentcor.py:194 in bound_switch
    return method(self = r_switch, zratio1 = zratio1, zratio2 = zratio2)

TypeError: r_switch.bound_switch.<locals>.<lambda>() got an unexpected keyword argument 'self'
@mingzehuang
Copy link
Owner

Sorry for the delay. I've fixed the data type problem. I changed all float to double. Now the version 0.2.5 on PyPI should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants