Skip to content

Conversation

adler-j
Copy link
Member

@adler-j adler-j commented Jun 28, 2018

This should replace #1231. I'm currently in the middle of a nightmarish merge of master changes and changes in this branch.

Edit: Overall my reaction to this PR atm is: Oh god please kill me. But I'll try to persevere.

Holger Kohr added 30 commits June 28, 2018 12:42
- expose trivial `none_context`
- add `xfail_if` utility for conditional xfail
- replace `almost_equal` by `pytest.approx` everywhere
- extend more lp_discr tests to other impls
- expose `array_module`, `array_cls` and `as_numpy` tools
  for handling arrays with different impls
- use native impl in diff_ops
- remove CupyTensor.ufuncs, use base class method
- add skip_if_no_cupy decorator
@pep8speaks
Copy link

Checking new PR...

Line 1869:21: E123 closing bracket does not match indentation of opening bracket's line

  • Complete extra results for this file :
                ):                    ^---

Line 30:1: E302 expected 2 blank lines, found 1

  • Complete extra results for this file :

def _ndigits(a, b, default=None):^---

Line 52:5: E123 closing bracket does not match indentation of opening bracket's line

  • Complete extra results for this file :
)    ^---

@kohr-h
Copy link
Member

kohr-h commented Jun 28, 2018

Is it mostly the tests or other stuff as well?

@kohr-h
Copy link
Member

kohr-h commented Jun 28, 2018

Just a minor remark: We should require CuPy >= 4.0 since it's the only version available through conda (I heard they also work on Windows support for 5.0), and since it supports a lot of useful stuff that earlier versions don't, most of all FFTs.

@adler-j
Copy link
Member Author

adler-j commented Jun 28, 2018

Basically someone (you and me) has done the same work exactly twice, one on master and one here. So there are merge conflicts everywhere. Join that with this branch actually containing some fundamental changes and you have a nightmare merge. I predict it will take at least a few days before it's all running smoothingly.

W.r.t windows its already up, I'm using it atm.

@kohr-h
Copy link
Member

kohr-h commented Jun 28, 2018

Basically someone (you and me) has done the same work exactly twice, one on master and one here. So there are merge conflicts everywhere. Join that with this branch actually containing some fundamental changes and you have a nightmare merge. I predict it will take at least a few days before it's all running smoothingly.

😬 😇

W.r.t windows its already up, I'm using it atm.

Cool, I guess through pip?

@adler-j
Copy link
Member Author

adler-j commented Jun 28, 2018

Question for @kohr-h. At what point (if at all) did np.absolute(complex_vector) start returning something in complex_vector.space.real_space?

@kohr-h
Copy link
Member

kohr-h commented Jun 28, 2018

This can only be the effect of __array_ufunc__.

@adler-j
Copy link
Member Author

adler-j commented Jun 28, 2018

Is there a list of the ufuncs that do this somewhere?

@kohr-h
Copy link
Member

kohr-h commented Jun 28, 2018

>>> ufuncs = list(
...     filter(
...         lambda a: isinstance(getattr(np, a), np.ufunc), 
...         dir(np)
...     )
... )
>>> c2r = list(
...     filter(
...         lambda f: any(t in getattr(np, f).types 
...                       for t in('F->f', 'D->d', 'G->g')),
...         ufuncs,
...     )
... )
>>> c2r
['abs', 'absolute']

@adler-j
Copy link
Member Author

adler-j commented Jun 28, 2018

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants