René's URL Explorer Experiment


Title: Console doesn't respect numpy.set_printoptions linewidth · Issue #1044 · bpython/bpython · GitHub

Open Graph Title: Console doesn't respect numpy.set_printoptions linewidth · Issue #1044 · bpython/bpython

X Title: Console doesn't respect numpy.set_printoptions linewidth · Issue #1044 · bpython/bpython

Description: Description When using bpython console, output of print(sum_numpy_array) is truncated to a line width of ~70 characters, regardless of the value set by numpy.set_printoptions(linewidth=). (Probably truncating to 75 characters, p...

Open Graph Description: Description When using bpython console, output of print(sum_numpy_array) is truncated to a line width of ~70 characters, regardless of the value set by numpy.set_printoptions(linewidth=). ...

X Description: Description When using bpython console, output of print(sum_numpy_array) is truncated to a line width of ~70 characters, regardless of the value set by numpy.set_printoptions(linewidth=<n_chars&...

Opengraph URL: https://github.com/bpython/bpython/issues/1044

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Console doesn't respect numpy.set_printoptions linewidth","articleBody":"## Description\n\nWhen using bpython console, output of `print(sum_numpy_array)` is truncated to a line width of ~70 characters, regardless of the value set by `numpy.set_printoptions(linewidth=\u003cn_chars\u003e)`.  (Probably truncating to 75 characters, per the [default value](https://numpy.org/doc/stable/reference/generated/numpy.set_printoptions.html#:~:text=linewidthint%2C%20optional,breaks%20(default%2075).))\n\n## Reproduction\n\n```python\nimport numpy as np\nmy_array = np.random.rand(10,10)\nprint(my_array)  # Default width\nnp.set_printoptions(linewidth=500)  # Significantly increase width\nprint(my_array)  # See if width has changed\n```\n\n### Output using `bpython` console\n\nLaunching the console with\n\n```bash\nbpython\n```\n\nand running the above commands, the final output stays the same width, e.g., \n\n```python\n[[0.16879042 0.3686932  0.11583333 0.71321688 0.13670377 0.25383321\n  0.92788538 0.85056165 0.95871566 0.45657286]\n [0.49414317 0.88604218 0.49922465 0.55992626 0.42089223 0.13897627\n  0.67980652 0.88978922 0.43246291 0.90526356]\n [0.33860567 0.52356898 0.75102455 0.33301567 0.7098871  0.21842158\n  0.46992689 0.76128979 0.88457363 0.78181751]\n [0.81131105 0.78620507 0.42323958 0.67422569 0.55118114 0.70407957\n  0.09016517 0.74287572 0.64249138 0.32268192]\n [0.73698842 0.69307092 0.53539859 0.28499058 0.21822006 0.04206897\n  0.49433916 0.09354207 0.43103985 0.93385655]\n [0.57097254 0.14512517 0.2543967  0.09382002 0.45794077 0.35054257\n  0.10442983 0.91845382 0.55508597 0.43811922]\n [0.11549397 0.21101277 0.33120293 0.02861319 0.68274748 0.65524105\n  0.85512808 0.24291806 0.50740652 0.55194984]\n [0.75793193 0.37992667 0.9271967  0.40700423 0.87117636 0.82544539\n  0.6475613  0.375711   0.10660802 0.80992348]\n [0.10731481 0.63415828 0.29611222 0.6099451  0.55459819 0.26587325\n  0.02677911 0.56104341 0.11235509 0.21292126]\n [0.0105919  0.77393485 0.94602175 0.93723815 0.26395324 0.60083277\n  0.9612396  0.01070631 0.28442629 0.54188245]]\n```\n\n### Output using `python3` console\n\nLaunching the console with\n\n```bash\npython3\n```\n\nand running the above commands, the final output changes truncation, as expected, e.g., \n\n```python\n[[0.46753165 0.01686997 0.70437271 0.24879456 0.02556759 0.83650928 0.43286804 0.9451887  0.46181752 0.61630296]\n [0.14566225 0.30565914 0.77176535 0.95703763 0.90894262 0.27614148 0.81659766 0.34812769 0.56174244 0.11549844]\n [0.32356831 0.25946131 0.0412169  0.75370806 0.33468114 0.20393067 0.55025587 0.44584574 0.58217767 0.0194622 ]\n [0.04457736 0.44181464 0.57638118 0.85024418 0.39383885 0.7514973  0.82326232 0.78800379 0.32851216 0.73534777]\n [0.83012166 0.02666477 0.55707597 0.57091802 0.65053171 0.38345246 0.93166186 0.35886066 0.98315683 0.29832238]\n [0.0459551  0.87111509 0.96831739 0.57373146 0.00515242 0.64619749 0.29837364 0.96973241 0.87579246 0.8223942 ]\n [0.50320441 0.80214551 0.27265131 0.43892873 0.28584371 0.17528833 0.10920415 0.18958378 0.52295676 0.24579679]\n [0.13021351 0.80121593 0.60686516 0.37569768 0.69666459 0.12626204 0.01553835 0.80746448 0.48018188 0.58879389]\n [0.02042933 0.10991487 0.50438164 0.41571544 0.37653485 0.08231128 0.36678203 0.29661942 0.8794024  0.82026911]\n [0.72970859 0.89390088 0.0175212  0.96947842 0.49559425 0.37974255 0.32831178 0.86434193 0.63606216 0.46084129]]\n```\n\n## Details\n\nStumbled across this issue using the following environment (installed by `uv` via a `hatch` environment), running on Ubuntu 22.04.3 LTS via Windows Subsystem for Linux.\n\n```term\n$ python3 -m pip freeze\nattrs==25.3.0\nblack==25.1.0\nblessed==1.21.0\nbpython==0.25\ncertifi==2025.8.3\ncfgv==3.4.0\ncharset-normalizer==3.4.3\nclick==8.2.1\ncoverage==7.10.6\ncurtsies==0.4.3\ncwcwidth==0.1.10\ndistlib==0.4.0\nfilelock==3.19.1\ngreenlet==3.2.4\nhypothesis==6.138.15\nidentify==2.6.14\nidna==3.10\niniconfig==2.1.0\nmypy_extensions==1.1.0\nnodeenv==1.9.1\nnumpy==2.3.3\npackaging==25.0\npathspec==0.12.1\nplatformdirs==4.4.0\npluggy==1.6.0\npre_commit==4.3.0\nPygments==2.19.2\npytest==8.4.2\npytest-cov==7.0.0\npyxdg==0.28\nPyYAML==6.0.2\nrequests==2.32.5\nscipy==1.16.2\nsortedcontainers==2.4.0\nurllib3==2.5.0\nvirtualenv==20.34.0\nwcwidth==0.2.13\n```\n\n## Additional context\n\nThis seems specific to the numpy set_printoptions function. \nIf I print a long string in the bpython console, it does not truncate at ~70 characters like the numpy array:\n\n```python\n\u003e\u003e\u003e print('x'*100)\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n```\n","author":{"url":"https://github.com/andrewwillowen","@type":"Person","name":"andrewwillowen"},"datePublished":"2025-09-17T02:37:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1044/bpython/issues/1044"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1d59e482-cd61-7ea3-6569-9be2b57977d7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD2DE:1BBF62:A0E980:E5D29C:69676BCA
html-safe-nonce5ab045d9aa37450c3e250ce568a1c10c5a4261b5924683014668e338e4284e63
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkRFOjFCQkY2MjpBMEU5ODA6RTVEMjlDOjY5Njc2QkNBIiwidmlzaXRvcl9pZCI6IjI1ODY3NjI3NjQzODU0Nzk2MjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacac66139eb38e5a000d8bc4405cffc067426c3d9b7c8797478bb6fe171f3c2e58
hovercard-subject-tagissue:3424374925
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bpython/bpython/1044/issue_layout
twitter:imagehttps://opengraph.githubassets.com/035d7162ce73ade296d4639fc178bbc481417361e7f6c4bbccb6c94c788e2a92/bpython/bpython/issues/1044
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/035d7162ce73ade296d4639fc178bbc481417361e7f6c4bbccb6c94c788e2a92/bpython/bpython/issues/1044
og:image:altDescription When using bpython console, output of print(sum_numpy_array) is truncated to a line width of ~70 characters, regardless of the value set by numpy.set_printoptions(linewidth=). ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameandrewwillowen
hostnamegithub.com
expected-hostnamegithub.com
None1a6a4ac66aaa8be0077b72a69fd56fb51cd11215a1e31f0365079e012987234a
turbo-cache-controlno-preview
go-importgithub.com/bpython/bpython git https://github.com/bpython/bpython.git
octolytics-dimension-user_id8071396
octolytics-dimension-user_loginbpython
octolytics-dimension-repository_id21508865
octolytics-dimension-repository_nwobpython/bpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id21508865
octolytics-dimension-repository_network_root_nwobpython/bpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release045909cd564d790cacd96dcb8722039dff679d63
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/bpython/bpython/issues/1044#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbpython%2Fbpython%2Fissues%2F1044
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbpython%2Fbpython%2Fissues%2F1044
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=bpython%2Fbpython
Reloadhttps://github.com/bpython/bpython/issues/1044
Reloadhttps://github.com/bpython/bpython/issues/1044
Reloadhttps://github.com/bpython/bpython/issues/1044
bpython https://github.com/bpython
bpythonhttps://github.com/bpython/bpython
Please reload this pagehttps://github.com/bpython/bpython/issues/1044
Notifications https://github.com/login?return_to=%2Fbpython%2Fbpython
Fork 252 https://github.com/login?return_to=%2Fbpython%2Fbpython
Star 2.8k https://github.com/login?return_to=%2Fbpython%2Fbpython
Code https://github.com/bpython/bpython
Issues 143 https://github.com/bpython/bpython/issues
Pull requests 4 https://github.com/bpython/bpython/pulls
Actions https://github.com/bpython/bpython/actions
Projects 0 https://github.com/bpython/bpython/projects
Wiki https://github.com/bpython/bpython/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/bpython/bpython/security
Please reload this pagehttps://github.com/bpython/bpython/issues/1044
Insights https://github.com/bpython/bpython/pulse
Code https://github.com/bpython/bpython
Issues https://github.com/bpython/bpython/issues
Pull requests https://github.com/bpython/bpython/pulls
Actions https://github.com/bpython/bpython/actions
Projects https://github.com/bpython/bpython/projects
Wiki https://github.com/bpython/bpython/wiki
Security https://github.com/bpython/bpython/security
Insights https://github.com/bpython/bpython/pulse
New issuehttps://github.com/login?return_to=https://github.com/bpython/bpython/issues/1044
New issuehttps://github.com/login?return_to=https://github.com/bpython/bpython/issues/1044
Console doesn't respect numpy.set_printoptions linewidthhttps://github.com/bpython/bpython/issues/1044#top
https://github.com/andrewwillowen
https://github.com/andrewwillowen
andrewwillowenhttps://github.com/andrewwillowen
on Sep 17, 2025https://github.com/bpython/bpython/issues/1044#issue-3424374925
default valuehttps://numpy.org/doc/stable/reference/generated/numpy.set_printoptions.html#:~:text=linewidthint%2C%20optional,breaks%20(default%2075).
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.