« first day (2065 days earlier)      last day (1148 days later) » 

7:54 AM
posted on February 24, 2021 by Cris Luengo

After several years of hard work, DIPlib 3 is finally out of beta. I presented the DIPlib 3 project on this blog three and a half years ago, when I discussed the advantages of the new C++ library over its C predecessor, and especially how C++ code using DIPlib 3 …

 
 
4 hours later…
11:48 AM
Are matrices limited by-definition to (at most? exactly?) 2D, or can an N-D array be considered a "matrix" as well?
 
@Dev-iL as far as I know they are a representation of a linear transformation between two vector spaces, and as such always 2d
the objects with more than 2 indices I've encountered have all been called tensors
which is correct I guess, because matrices in the above sense are also tensors
there's probably a broader meaning of matrix for 2d tables specifically, but that's orthogonal to your question
 
Hmmm.... so following the above logic, is it incorrect to call any arbitrary 2D array a matrix?
perhaps it's not wrong, but sometimes it's just meaningless
 
12:08 PM
the "2d-ness" is definitely a requirement for something to be a matrix in the context of maths, and I think it is totally fine to call any 2d table of numbers (or maybe even other objects that you can caluclate stuff with) a matrix
I'd just be careful with this term if it is not clear if the 2d array could be jagged
(like a list of lists or so)
 
12:36 PM
guys, how do I turn an ndarray of int64s of size Nx2 to list of length N containing lists of length 1x2?
if it helps, I have two Nx1 vectors as separate variables (let's call them A and B)
 
you probably want list of length 2? (1x2 doesn't make much sense in the context of lists, doesn't it)?
 
sure, that ^
[[i, j] for i, j in zip(list_1, list_2)]?
 
In your example you seem to have two lists not an ndarray?
if a is of shape (n,2) I'd use [list(x) for x in a]
if you iterate over an n-d-array you iterate over the first dimension (just like if you'd iterate over nested lists)
If a list of tuples works you can also use [*zip(*a.T)] which is a little bit shorter
or a list of lists with [*map(list, [*zip(*a.T)])] but then the first solution is probably more readable and shorter:)
or for the most boring solution: a.tolist() (just mentioning this to avoid getting strangulated by Andras)
 
cool, thanks
 
the other question is, do you really need lists? all most everything in python works just as nicely if you use your original n-d-array instead
 
1:09 PM
well... I'm restricted by a "library" I'm using
 
1:38 PM
@Dev-iL arr.tolist()?
 
Yeah that's probably what I needed
 
@Dev-iL maybe, I don't have a strong opinion about that. But yeah, if I had to formalize it I'd say that matrices obey matrix multiplication rules.
when you have an (N, 2) array this might or might not be the case
 
 
2 hours later…
3:48 PM
posted on February 24, 2021 by Johanna Pingel

Recently, I have been writing short Q&A columns on deep learning. I'm excited to share the latest article with you today: All About Pretrained Models. In this post, I'll walk through the first of... read more >>

 
4:29 PM
posted on February 24, 2021 by Loren Shure

I was talking to my long-time colleague, Mike Croucher, who joined MathWorks team recently (yay!). About a bunch of interesting topics, some of which could be good fodder for a blog post. Today I... read more >>

 
 
7 hours later…
11:18 PM
48
Q: How much percentage royalty do I get from Springer (as the paper's author) and how I can apply for royalty payment?

vipul salunkeI have submitted a paper to a Springer conference and it has been published. The publisher will charge 24.95$ to anyone who would eventually download my paper and 201 copies of my research sold by Springer official site. How much percentage royalty do I get from Springer (as the paper's author) a...

 
lol
 
Not sure if it's serious:)
 
yeah, Poe's law is strong here
 

« first day (2065 days earlier)      last day (1148 days later) »