« first day (3003 days earlier)      last day (1491 days later) » 

1:17 AM
@Silvia A very formal name for the bottom part is frustrum. In this case it would be an oblique frustrum whereas it would have been a right frustrum if the cut were parallel to the base. The other part would be the apical part, that is, "the part next to the apex". I have not heard of a simple name for this part.
2
 
1:58 AM
@Szabolcs I don't know, but I'd be curious the answer if you asked on the main site
@WReach Well, that's my new knowledge for the day
@WReach but be sure to check out footnote 1 en.wikipedia.org/wiki/Frustum#endnote_1
;-)
 
2:15 AM
@ChrisK Yikes, I fell into that trap. My mind thinks frustum by my finger muscle memory types frustrum @Silvia: please take note: it is "frustum".
 
I can't find this in the documentation for the life of me, but something like this must exist. How do I find the index of the largest component of a vector?
I'm hoping for something like ArgMax[{.75, .25, 1.00, .50}, componentIndex] == 3.
ArgMax[] itself should be what I'm looking for, but I can't seem to get it
 
2:30 AM
@Axoren (probably) fastest way: Pick[Range[Length[array]], array, Max[array]]
 
Will that work on the output of Grad[]?
 
What is the output of Grad?
 
A vector
 
Then yes
The only issue arises when you have multi-dimensional arrays, in which case the Range spec needs to be your full array of indices
 
I keep getting "not found" when I use TakeLargest and then FirstPosition
 
2:32 AM
If you need to do this many times, prebuild your indices
What are you doing with TakeLargest and FirstPosition?
 
In[24]:= f[x_, y_] := 1 - ((20 - x)/20)^y
In[25]:= g[x_, y_] = Grad[f[x, y], {x, y}]
In[200]:= h[x_, y_] = Pick[Range[Length[g[x, y]]], g[x, y], Max[g[x, y]]]
Out[200]= {}

In[201]:=
h[6, 2]
h[2, 2]

Out[201]= {}
Out[202]= {}
It's not working
Same problems
I know I can do it by using Partial Derivatives instead
But I already have gradients and I'm being stubborn
 
Dude you need to use :=
 
Ugh, is that the slip up?
 
Otherwise Max[g[x, y]] isn't numerical
 
I'm so used to not using := from other languages
So I've made that mistake a bunch
 
2:34 AM
f[x_, y_] := 1 - ((20 - x)/20)^y;
g[x_, y_] = Grad[f[x, y], {x, y}]

{20^-y (20 - x)^(-1 + y) y, 20^-y (20 - x)^y Log[20] - 20^-y (20 - x)^y Log[20 - x]}

h[x_, y_] = Max[g[x, y]]

Max[20^-y (20 - x)^(-1 + y) y, 20^-y (20 - x)^y Log[20] - 20^-y (20 - x)^y Log[20 - x]]
= will immediately evaluate the RHS
:= will wait until the function is called
 
h[x_, y_] should not be the Max, it should be the index of the largest component
 
I basically never use raw = when defining functions
I know but it's immediately evaluating that expression
 
Okay, so it's working. That was it.
 
Yup
 
It gives the result as {2} and {1}, is there a way to get those out of there?
 
2:37 AM
Easiest is to put a [[1]] at the end
 
The way I'm doing it when I see it requires I save the value as a variable first
Thanks
 
If there are multiple indices which have the max value it'll return all of them, hence the list wrapping
 
I see, of course. I wasn't thinking about that because in my application it's not possible for both to be equal
I'm trying to only consider the domain of integers
And it very quickly deviates in the range I'm looking at
 
3:07 AM
That split in the middle is supposed to be where the colors split.
That while line is supposed to bisect the colors, but it just draws the colors down the middle.
 
3:45 AM
@Axoren set ColorFunctionScaling -> False
 
4:05 AM
@b3m2a1 That did it. Is there a reason why that option's default behavior doesn't work out of the box for a discrete values? There's some obvious funk at the point where the colors blend, but I'd be willing to accept that if that funk was at least in the right place.
 
It's because ColorFunction expects values from [0, 1] by default so Mathematica scales everything into that range.
You have to explicitly turn that off if you want to do something different
 
 
2 hours later…
5:52 AM
@WReach Nice! I knew there would be names for them! (And yes I noticed the spelling :) Many thanks!
I tend to believe there is magic in true names :)
 
 
10 hours later…
3:42 PM
From medRxiv(line 221): "About 30% of recovered patients generated very low titers of SARS-CoV-2-specific NAbs"
They have a very small sample set (175 patients). But if their finding is true, then herd immunity might be harder to achieve than people had thought.
Here NAbs is short for neutralizing antibodies.
 
 
3 hours later…
7:03 PM
 
Hey guys! You will be pleased to hear that we have made available on GitHub the CodeParser and CodeInspector projects that I have been working on:

https://github.com/WolframResearch/codeparser
https://github.com/WolframResearch/codeinspector
13
CodeParser is a full-fledged WL parser, and CodeInspector is a linter for WL
Please check them out and play around with them and let me know what you think!
 

« first day (3003 days earlier)      last day (1491 days later) »