Skip to content

cvxpy error: Calling a numpy function on a CVXPY expression. #6

Description

@jimmysue

I encounter error below when running relighting script.

Traceback (most recent call last):
  File "/root/sjz/github/RI_render_DPR/step_6/script_relighting.py", line 267, in <module>
    script_relighting(5)
  File "/root/sjz/github/RI_render_DPR/step_6/script_relighting.py", line 214, in script_relighting
    sh, skinImg = getSH.get_SH(Lab[:,:,0]/255.0, mask, normal)
  File "/root/sjz/github/RI_render_DPR/step_6/generate_face.py", line 124, in get_SH
    return self.opt_SH.get_SH(SH_base, b), skinImg
  File "/root/sjz/github/RI_render_DPR/step_6/generate_face.py", line 35, in get_SH
    T += self.C[:, :, i] * x[i]
  File "/opt/conda/envs/dpr/lib/python3.6/site-packages/cvxpy/expressions/expression.py", line 721, in __array_ufunc__
    raise RuntimeError(__NUMPY_UFUNC_ERROR__)
RuntimeError: 
You're calling a NumPy function on a CVXPY expression. This is prone to causing
errors or code that doesn't behave as expected. Consider using one of the
functions documented here: https://www.cvxpy.org/tutorial/functions/index.html

system info:

NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

python info

Python 3.6.13 :: Anaconda, Inc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions