Skip to content

Create a new xmode "Docs"#14752

Merged
Carreau merged 8 commits intoipython:mainfrom
Carreau:docsformat
Feb 21, 2025
Merged

Create a new xmode "Docs"#14752
Carreau merged 8 commits intoipython:mainfrom
Carreau:docsformat

Conversation

@Carreau
Copy link
Member

@Carreau Carreau commented Feb 20, 2025

This is a compact mode with a minimal header and no traceback,
mosttly to be used in Documentation, where the context of the traceback
is rarely useful

$ ipython --InteractiveShell.xmode=Docs

In [1]: import pywt
    ...:
    ...: a = pywt.idwt([1,2,3,4,5], [1,2,3,4], 'db2' ,'symmetric')
    ...:
    ...: print(a)
Traceback (most recent call last): Cell In[1], line 3

->  a = pywt.idwt([1,2,3,4,5], [1,2,3,4], 'db2' ,'symmetric')

    [... 3 skipped frames]

ValueError: Coefficients arrays must have the same size.

@Carreau
Copy link
Member Author

Carreau commented Feb 20, 2025

This should take care of #14591

@rgommers, tell me if you find that the following is compact enough, or if you want something even more compact.

Traceback (most recent call last): Cell In[1], line 3

->  a = pywt.idwt([1,2,3,4,5], [1,2,3,4], 'db2' ,'symmetric')

    [... 3 skipped frames]

ValueError: Coefficients arrays must have the same size.

@rgommers
Copy link

That looks good to me, I think that should be enough. Thanks for pushing on this!

@Carreau
Copy link
Member Author

Carreau commented Feb 20, 2025

Thanks, I still need to clean that up, might a few more days though.

Thanks for the quick feedback.

This is a compact mode with a minimal header and no traceback,
mosttly to be used in Documentation, where the context of the traceback
is rarely useful

```
$ ipython --InteractiveShell.xmode=Docs

In [1]: import pywt
   ...:
   ...: a = pywt.idwt([1,2,3,4,5], [1,2,3,4], 'db2' ,'symmetric')
   ...:
   ...: print(a)
Traceback (most recent call last): Cell In[1], line 3

->  a = pywt.idwt([1,2,3,4,5], [1,2,3,4], 'db2' ,'symmetric')

    [... 3 skipped frames]

ValueError: Coefficients arrays must have the same size.
```
@Carreau Carreau marked this pull request as ready for review February 21, 2025 10:40
@Carreau Carreau added this to the 9.0 milestone Feb 21, 2025
@Carreau Carreau merged commit bd310ed into ipython:main Feb 21, 2025
13 of 18 checks passed
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.

2 participants