René's URL Explorer Experiment


Title: confusing results, the same usage memory in loops besides negative values · Issue #353 · pythonprofilers/memory_profiler · GitHub

Open Graph Title: confusing results, the same usage memory in loops besides negative values · Issue #353 · pythonprofilers/memory_profiler

X Title: confusing results, the same usage memory in loops besides negative values · Issue #353 · pythonprofilers/memory_profiler

Description: @fabianp How could I get true results or interpret them? memory-profiler shows same usage values for lines in the loop. import numpy as np from scipy.spatial import cKDTree, distance import os from memory_profiler import profile radii = ...

Open Graph Description: @fabianp How could I get true results or interpret them? memory-profiler shows same usage values for lines in the loop. import numpy as np from scipy.spatial import cKDTree, distance import os from...

X Description: @fabianp How could I get true results or interpret them? memory-profiler shows same usage values for lines in the loop. import numpy as np from scipy.spatial import cKDTree, distance import os from...

Opengraph URL: https://github.com/pythonprofilers/memory_profiler/issues/353

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"confusing results, the same usage memory in loops besides negative values","articleBody":"@fabianp  How could I get true results or interpret them? `memory-profiler` shows same usage values for lines in the loop.\r\n```\r\nimport numpy as np\r\nfrom scipy.spatial import cKDTree, distance\r\nimport os\r\nfrom memory_profiler import profile\r\n\r\nradii = np.loadtxt(os.path.join(os.path.join(os.environ['USERPROFILE']), 'Desktop', \"data\", 'radii.csv'))\r\nposs = np.loadtxt(os.path.join(os.path.join(os.environ['USERPROFILE']), 'Desktop', \"data\", 'coordinates.csv'), delimiter=\",\")\r\nprint(len(radii))\r\nrad_max = np.amax(np.hstack(radii))\r\ndia_max = 2 * rad_max\r\n\r\n@profile\r\ndef ends_gap_opt(poss, dia_max):\r\n    particle_corsp_overlaps = []\r\n    ends_ind = [np.empty([1, 2], dtype=np.int64)]\r\n\r\n    kdtree = cKDTree(poss)\r\n\r\n    for particle_idx in range(len(poss)):\r\n        cur_point = poss[particle_idx]\r\n        nears_i_ind = np.array(kdtree.query_ball_point(cur_point, r=dia_max), dtype=np.int64)\r\n        assert len(nears_i_ind) \u003e 0\r\n\r\n        if len(nears_i_ind) \u003c= 1:\r\n            continue\r\n\r\n        nears_i_ind = nears_i_ind[nears_i_ind != particle_idx]\r\n        dist_i = distance.cdist(poss[nears_i_ind], cur_point[None, :]).squeeze()\r\n\r\n        contact_check = dist_i - (radii[nears_i_ind] + radii[particle_idx])\r\n        connected = contact_check[contact_check \u003c= 0]\r\n\r\n        particle_corsp_overlaps.append(connected)\r\n```\r\n![11](https://user-images.githubusercontent.com/63285654/155914051-429988c0-fa0c-4c8f-b8c3-cd08b3f3a17a.PNG)\r\n[radii.csv](https://github.com/pythonprofilers/memory_profiler/files/8150100/radii.csv)\r\n[coordinates.csv](https://github.com/pythonprofilers/memory_profiler/files/8150101/coordinates.csv)\r\n\r\nI have modified the `memory_profiler.py` as pull requests [Fix: Large negative increments #350](https://github.com/pythonprofilers/memory_profiler/pull/350/commits/aa95e34cf6be3c51ba4aa3ccd014f6d40fc32392) and also, in another test using [large negative increment values in line profiler #195](https://github.com/pythonprofilers/memory_profiler/issues/195#issuecomment-401619708), . Both solutions remove previous negative values from *increments*. Which of them is the true one?  \r\nThe same *mem usage*s are doubtful and seem to be wrong:\r\n\r\n![111](https://user-images.githubusercontent.com/63285654/155916732-d97295cf-e6e4-4b15-81d9-76c4873bf256.PNG)","author":{"url":"https://github.com/alisheikholeslam","@type":"Person","name":"alisheikholeslam"},"datePublished":"2022-02-28T02:27:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/353/memory_profiler/issues/353"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6691030e-9f55-e953-a9a6-ee50547e10ab
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA3CE:1FCEED:91C0C7:CCBB52:696F63E7
html-safe-noncef0fe49e9ecd3f55e80f8c72426e631aae6bd7cf4706ef0ed16f0aaf45267d7c6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0NFOjFGQ0VFRDo5MUMwQzc6Q0NCQjUyOjY5NkY2M0U3IiwidmlzaXRvcl9pZCI6IjEyMDg5OTUxMjkyNTM4MTYwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace91824f1551c99e060021f029a9b3bbedfabf32dd6b8ad7901423bb9f36846f9
hovercard-subject-tagissue:1153540908
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/pythonprofilers/memory_profiler/353/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a2230455b21351fcd481e4a1f34f6b6de111f904bbf508be7cb0cf26e153a217/pythonprofilers/memory_profiler/issues/353
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a2230455b21351fcd481e4a1f34f6b6de111f904bbf508be7cb0cf26e153a217/pythonprofilers/memory_profiler/issues/353
og:image:alt@fabianp How could I get true results or interpret them? memory-profiler shows same usage values for lines in the loop. import numpy as np from scipy.spatial import cKDTree, distance import os from...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamealisheikholeslam
hostnamegithub.com
expected-hostnamegithub.com
None774d0922d2c4577043d2dab90427344eb4c6ce1d5579acb1dd504cff1a7e46f8
turbo-cache-controlno-preview
go-importgithub.com/pythonprofilers/memory_profiler git https://github.com/pythonprofilers/memory_profiler.git
octolytics-dimension-user_id32906038
octolytics-dimension-user_loginpythonprofilers
octolytics-dimension-repository_id2575826
octolytics-dimension-repository_nwopythonprofilers/memory_profiler
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id2575826
octolytics-dimension-repository_network_root_nwopythonprofilers/memory_profiler
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
release650acea592f12d1bd8931d44546c209e0b06ed6e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/issues/353#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpythonprofilers%2Fmemory_profiler%2Fissues%2F353
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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpythonprofilers%2Fmemory_profiler%2Fissues%2F353
Sign up https://patch-diff.githubusercontent.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=pythonprofilers%2Fmemory_profiler
Reloadhttps://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/issues/353
Reloadhttps://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/issues/353
Reloadhttps://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/issues/353
pythonprofilers https://patch-diff.githubusercontent.com/pythonprofilers
memory_profilerhttps://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpythonprofilers%2Fmemory_profiler
Fork 385 https://patch-diff.githubusercontent.com/login?return_to=%2Fpythonprofilers%2Fmemory_profiler
Star 4.5k https://patch-diff.githubusercontent.com/login?return_to=%2Fpythonprofilers%2Fmemory_profiler
Code https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler
Issues 125 https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/issues
Pull requests 14 https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/pulls
Actions https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/actions
Projects 0 https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/projects
Wiki https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/security
Please reload this pagehttps://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/issues/353
Insights https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/pulse
Code https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler
Issues https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/issues
Pull requests https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/pulls
Actions https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/actions
Projects https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/projects
Wiki https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/wiki
Security https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/security
Insights https://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/pythonprofilers/memory_profiler/issues/353
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/pythonprofilers/memory_profiler/issues/353
confusing results, the same usage memory in loops besides negative valueshttps://patch-diff.githubusercontent.com/pythonprofilers/memory_profiler/issues/353#top
https://github.com/alisheikholeslam
https://github.com/alisheikholeslam
alisheikholeslamhttps://github.com/alisheikholeslam
on Feb 28, 2022https://github.com/pythonprofilers/memory_profiler/issues/353#issue-1153540908
@fabianphttps://github.com/fabianp
https://user-images.githubusercontent.com/63285654/155914051-429988c0-fa0c-4c8f-b8c3-cd08b3f3a17a.PNG
radii.csvhttps://github.com/pythonprofilers/memory_profiler/files/8150100/radii.csv
coordinates.csvhttps://github.com/pythonprofilers/memory_profiler/files/8150101/coordinates.csv
Fix: Large negative increments #350https://github.com/pythonprofilers/memory_profiler/pull/350/commits/aa95e34cf6be3c51ba4aa3ccd014f6d40fc32392
large negative increment values in line profiler #195https://github.com/pythonprofilers/memory_profiler/issues/195#issuecomment-401619708
https://user-images.githubusercontent.com/63285654/155916732-d97295cf-e6e4-4b15-81d9-76c4873bf256.PNG
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.