8000 'numpy.ndarray' object has no attribute 'device' · Issue #1635 · weihuayi/fealpy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

'numpy.ndarray' object has no attribute 'device' #1635

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

Open
yoczhang opened this issue May 10, 2025 · 0 comments
Open

'numpy.ndarray' object has no attribute 'device' #1635

yoczhang opened this issue May 10, 2025 · 0 comments

Comments

@yoczhang
Copy link

2025-5-10, 尝试运行 example/fem/poisson_lfem_dirichlet.py, backend 为默认的 numpy, 信息如下:

'numpy.ndarray' object has no attribute 'device'
  File "fealpy\sparse\ops.py", line 65, in spdiags
    diags_inds = bm.arange(len_diags, device=data.device, dtype=bm.int64)
  File "fealpy\fem\dirichlet_bc.py", line 140, in apply_matrix
    D0 = spdiags(1-bdIdx, 0, A.shape[0], A.shape[0])
  File "fealpy\fealpy\fem\dirichlet_bc.py", line 120, in apply
    A = self.apply_matrix(A, check=check)
  File "poisson_lfem_dirichlet.py", line 108, in <module>
    A, F = DirichletBC(space, gd=pde.solution).apply(A, F)
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

1 participant
0