Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

failed in converting 2nd argument `b' of _flapack.dpotrs to C/Fortran array

See original GitHub issue

Y_init = np.array(Y_init,ndmin=2,order=‘F’) X_init = np.array(X_init,ndmin=2) import GPy from emukit.model_wrappers.gpy_model_wrappers import GPyModelWrapper from emukit.bayesian_optimization.acquisitions import ExpectedImprovement from emukit.core.optimization import AcquisitionOptimizer kernel = GPy.kern.Matern52(X_init.shape[1], ARD=True) gp = GPyModelWrapper(GPy.models.GPRegression(X_init, Y_init, kernel, noise_var=1e-10)) gives error:~\Anaconda3\lib\site-packages\gpy-1.9.6-py3.6-win-amd64.egg\GPy\util\ in dpotrs(A, B, lower) : error: failed in converting 2nd argument `b’ of _flapack.dpotrs to C/Fortran array X_init = [[ -5.5589826 384.25838475 751.38855262 164.3880191 1007.11674873] [ -1.08051782 382.02255555 200.88970441 268.82545867 588.76049642]] Y_init= [[0.37135806 0.31397561]]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

lawrenndcommented, Nov 6, 2020

I just had the same issue. It was a dimension mismatch, but the error message is super unclear.

For me it was a problem that arises in GPy.models.GPRegression() when X and y have different numbers of rows and the model tries to initialise and fails in the dpotrs call.

Perhaps we should raise an issue on GPy to do a dimension check??

apaleyescommented, Nov 8, 2020

Thanks Neil, very helpful. Bang:

Read more comments on GitHub >

github_iconTop Results From Across the Web

failed in converting 2nd argument `b' of _flapack.dpotrs to C ...
Y_init = np.array(Y_init,ndmin=2,order='F') X_init = np.array(X_init,ndmin=2) import GPy from emukit.model_wrappers.gpy_model_wrappers ...
Read more >
F2PY. Passing array. "failed in converting 2nd argument `xmin ...
I am using F2PY for the first time. I have a FORTRAN routine similar to: SUBROUTINE init( ...
Read more >
[SciPy-user] fmin_l_bfgs_b problem
error : failed in converting 7th argument `g' of _lbfgsb.setulb to C/Fortran array. BTW, are there searchable archives of this list somewhere? Yaroslav....
Read more >
Using F2PY bindings in Python — NumPy v1.25.dev0 Manual
Because Python strings are immutable, an intent(inout) argument expects an array version of a string in order to have in situ changes be...
Read more >
F2Py with allocatable and assumed shape arrays
I am not super familiar with f2py internals, but I am very familiar with wrapping Fortran. F2py just automates some or all of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found