frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Why did not numpy copy the J rank concept?

11•jrank•7h ago
Recently there was a post [1] about numpy being not easy to work with when using arrays of shape greater than 2.

  One of the problems mentioned in [1] is that  you can not use python loops because they are slow.  In J you can solve for example 100 equations using the rank concept, this is a simple  example:

   a=: 2 2 $ 1 1 1 _1
   b=: 10 2 $ ? 20 # 10
   solutions =: b %. "(1 _) a
That code solve the systems a * v_i = b_i for ten random vectors. I think a similar concept could be developed in numpy. The syntax "(1 _)" indicates to take the rows from the left operator and all (_ is infinite) of a apply solve (that is %. in J). In this case the system is x+y=y0, x-y=y1.

So I would suggest somthing like numpy.linalg.solve(a,b,rank=(1,inf))

[1] https://news.ycombinator.com/item?id=43996431

Comments

tester89•5h ago
The question you're asking seems interesting, but I don't understand J code so I don't know what you're talking about. Expanding the explanation would be helpful!
jrank•1h ago
If you have a a Numpy function that takes for example two arguments, my proposal is to add a optional argument that allows that function to be applied to cells of dimensions i and j by function_name(a,b,range=(i,j)) so that the function is applied to subarrays of dimension i of a and subarrays of dimension j of b to create a new array. The broadcast operation and the axis arguments are not a general solution. I J you have such mechanism as the example shows.

The 1 cell of a matrix are the rows, etc.

Pompidou•3h ago
Maybe the internal broadcasting mecanism in numpy don't allow this nativelly ?
jrank•7m ago
The post I referenced before shows that broadcast is not a general solution.

Amiga Graphics Archive adds a big selection of color cycling images

https://amiga.lychesis.net/updates/2025-07-05.html
1•doener•2m ago•0 comments

Show HN: An online 2d shooter game in development

https://github.com/andreamonaco/zombieland
1•andreamonaco•3m ago•0 comments

Typing Speed Is the Hidden Signal of a 10x Developer

https://texttoslides.ai/blog/hire-by-typing-speed
1•sh_tomer•4m ago•0 comments

Stop deploying web application firewalls (2023)

https://www.macchaffee.com/blog/2023/wafs/
1•thunderbong•6m ago•0 comments

Video Cable Becomes Transmitter with Tempest-LoRa

https://hackaday.com/2025/07/04/video-cable-becomes-transmitter-with-tempest-lora/
1•mickle00•7m ago•0 comments

The Tandy Corporation, Part 2

https://www.abortretry.fail/p/the-tandy-corporation-part-2
2•rbanffy•11m ago•0 comments

Cursor's 500 requests => "unlimited" => 225 requests

https://blog.kilocode.ai/p/cursors-500-requests-unlimited-225
2•janpaul123•14m ago•0 comments

Regulators warned Air India Express about forging records

https://www.reuters.com/business/aerospace-defense/regulators-warned-air-india-express-about-delay-airbus-engine-fix-forging-2025-07-04/
2•qwertyuiop_•15m ago•0 comments

Dreadnought Hoax

https://en.wikipedia.org/wiki/Dreadnought_hoax
1•petethomas•16m ago•0 comments

Ask HN: How many communities HN it devs in C language?

1•FerkiHN•24m ago•0 comments

Broken AI Discourse with Steve Klabnik [video]

https://www.youtube.com/watch?v=MrfiUMm2Qxk
1•todsacerdoti•26m ago•0 comments

Show HN: Liryo – Book journal app that tracks stats, goals and spending

https://liryo.app
5•roxanamb•26m ago•0 comments

Loggers close in on uncontacted people in Peruvian Amazon

https://www.theguardian.com/global-development/2025/jul/05/we-dont-want-contact-because-you-are-bad-loggers-close-in-on-uncontacted-people-in-peruvian-amazon
3•mykowebhn•28m ago•0 comments

Speeding up PostgreSQL dump/restore snapshots

https://xata.io/blog/behind-the-scenes-speeding-up-pgstream-snapshots-for-postgresql
2•tudorg•31m ago•0 comments

The New York Times News Quiz, July 4, 2025

https://www.nytimes.com/interactive/2025/07/04/briefing/news-quiz-trump-bill-diddy-verdict.html
1•whack•32m ago•0 comments

The Calculator-on-a-Chip (2015)

http://www.vintagecalculators.com/html/the_calculator-on-a-chip.html
2•Bogdanp•35m ago•0 comments

Long-lost Chinese typewriter prototype from the 1940s that changed computing

https://www.npr.org/2025/07/05/nx-s1-5405452/chinese-typewriter-mingkwai-stanford
3•GuinansEyebrows•39m ago•0 comments

Thesis Drift

https://www.md-a.co/p/thesis-drift
1•jger15•42m ago•0 comments

Show HN: I designed a math boardgame. HTML mock-up is now a playable game

https://www.paperclipmaximizer.ai/staktyl/
1•ycombiredd•47m ago•0 comments

EU says it will continue rolling out AI legislation on schedule

https://techcrunch.com/2025/07/04/eu-says-it-will-continue-rolling-out-ai-legislation-on-schedule/
2•rntn•52m ago•0 comments

Senate Tax Bill Expands QSBS Benefits for Startups

https://www.cooley.com/news/insight/2025/2025-06-20-senate-tax-bill-expands-qsbs-benefits
1•walterbell•54m ago•0 comments

Git experts should try Jujutsu

https://pksunkara.com/thoughts/git-experts-should-try-jujutsu/
2•steveklabnik•57m ago•0 comments

Cursor Pricing Changes

https://simonwillison.net/2025/Jul/5/cursor-clarifying-our-pricing/
2•walterbell•58m ago•0 comments

ApplePay vs. Alternative Payment Services

https://www.taler.net/en/news/2025-05.html
40•prognu•1h ago•15 comments

Is There Is Any PNG and SVG Icons Website That Work Without JavaScript?

2•Improvement•1h ago•1 comments

Adding a new instruction to RISC-V back end in LLVM

https://blog.gustavoleite.me/llvm-riscv-instruction
5•gstvleite•1h ago•0 comments

Cops in [Spain] think everyone using a Google Pixel must be a drug dealer

https://www.androidauthority.com/google-pixel-organized-crime-preferred-phone-3573578/
35•zczc•1h ago•17 comments

Goodbye to All That – My Resignation from the FBI

https://www.lawfaremedia.org/article/goodbye-to-all-that
49•ruph123•1h ago•12 comments

Show HN: I Made a Hot or Not Benchmark for AI Design

https://www.designarena.ai/vote
5•grxxxce•1h ago•1 comments

The curious rise of giant tablets on wheels

https://arstechnica.com/gadgets/2025/07/the-curious-rise-of-giant-tablets-on-wheels/
3•CharlesW•1h ago•1 comments