Originally appeared here:
Can’t wait for Prime Video’s Roger Federer and K-pop documentaries? Stream these 3 now
Tag: technews
-
Can’t wait for Prime Video’s Roger Federer and K-pop documentaries? Stream these 3 now
Prime Video is getting new Roger Federer and K-pop documentaries – here are three highly rated streaming now to watch while you wait. -
Chrome is getting a big privacy and security boost from Google to help safeguard your home network
A new security feature for Google Chrome is in development, aiming to protect devices on private networks, enhancing privacy, and safeguarding against cyber threats.Originally appeared here:
Chrome is getting a big privacy and security boost from Google to help safeguard your home network -
“With KeyTrap, an attacker could completely disable large parts of the worldwide Internet” — this deceptively simple cyberattack could spell doom for apps everywhere
A DoS attack at the DNS level could render apps useless for hours, new research paper shows.“With KeyTrap, an attacker could completely disable large parts of the worldwide Internet” — this deceptively simple cyberattack could spell doom for apps everywhere“With KeyTrap, an attacker could completely disable large parts of the worldwide Internet” — this deceptively simple cyberattack could spell doom for apps everywhere -
Massive Amazon Presidents’ Day sale – 19 best deals to shop before it ends tonight
We’ve searched through the Presidents’ Day sale at Amazon and picked out these 19 best deals worth buying before it ends.Massive Amazon Presidents’ Day sale – 19 best deals to shop before it ends tonightMassive Amazon Presidents’ Day sale – 19 best deals to shop before it ends tonight -
Reddit sells training data to unnamed AI company ahead of IPO
If you’ve posted on Reddit, you’re likely feeding the future of AI.Go Here to Read this Fast! Reddit sells training data to unnamed AI company ahead of IPO
Originally appeared here:
Reddit sells training data to unnamed AI company ahead of IPO -
Lenco’s latest turntable is a super affordable option for vinyl and mixing beginners
There’s a lot to love about Lenco’s latest record player, which puts a modern spin on classic vinyl sound.Originally appeared here:
Lenco’s latest turntable is a super affordable option for vinyl and mixing beginners -
The 21 best Presidents’ Day TV sales 2024 – up to $1,000 off 4K, QLED and OLED TVs
Your 2024 Presidents’ Day TV sales guide with today’s 21 best deals on our best-rated 4K, QLED, and OLED displays.The 21 best Presidents’ Day TV sales 2024 – up to $1,000 off 4K, QLED and OLED TVsThe 21 best Presidents’ Day TV sales 2024 – up to $1,000 off 4K, QLED and OLED TVs -
New app always points to the supermassive black hole at the center of our galaxy
iPhone compass app made with AI assistance locates the heart of the Milky Way.Originally appeared here:
New app always points to the supermassive black hole at the center of our galaxy -
Visualizing Complex-Valued Functions Using Python and Mathematica
Visualizing Complex-Valued Functions in Python and Mathematica
Unlocking visual insights into a difficult but powerful branch of math
Today I was pouring through Complex Variables and Analytic Functions by the esteemed Fornberg and Piret, trying my best to wrap my mind around how complex-valued functions behave. Mentally vizualization such functions is extra difficult since they take a real and an imaginary input, and outputs two components as well. Therefore, a single 3-D plot is not sufficient to see how the function behaves. Rather, we have to split such a visualization into separate plots of the imaginary and real parts, or alternatively by magnitude and argument, or angle.
I wanted to be able to play around with any function I could think of, drag and zoom around its plots, and explore it in visual detail to understand how it resulted from the equation. For such a task, Wolfram Mathematica is an excellent starting tool.
Wolfram Language
plotComplexFunction[f_]:=Module[{z,rePlot,imPlot,magPlot,phasePlot},z=x+I y;
rePlot = Plot3D[Re[f[z]],{x,-2,2},{y,-2,2},AxesLabel->{"Re(z)","Im(z)","Re(f(z))"},Mesh->None];
imPlot = Plot3D[Im[f[z]],{x,-2,2},{y,-2,2},
AxesLabel->{"Re(z)","Im(z)","Im(f(z))"},
Mesh->None];
magPlot = Plot3D[Abs[f[z]], {x, -2, 2}, {y, -2, 2},
AxesLabel -> {"Re(z)", "Im(z)", "Abs(f(z))"},
Mesh -> None,
ColorFunction -> Function[{x, y, z}, ColorData["Rainbow"][Rescale[Arg[x + I y], {-Pi, Pi}]]],
ColorFunctionScaling -> False];
phasePlot=DensityPlot[Arg[f[z]],{x,-2,2},{y,-2,2},
ColorFunction->"Rainbow",
PlotLegends->Automatic,
AxesLabel->{"Re(z)","Im(z)"},
PlotLabel->"Phase"];
GraphicsGrid[{{rePlot,imPlot},{magPlot,phasePlot}},ImageSize->800]];
f[z_]:=(1/2)*(z+1/z);
plotComplexFunction[f]
https://github.com/dreamchef/complex-functions-visualizationhttps://github.com/dreamchef/complex-functions-visualization
I wrote the above Mathematica code to produce a grid of plots showing the function in both ways just described. On the top, the imaginary and real parts of the function
are shown, and on the bottom, and the magnitude, and the phase shown in color:
Component-Wise and Magnitude-Phase Plots of f(z) from Wolfram After playing around with a few functions using this code and convincing myself they made sense, I was interested in getting the same functionality in Python, to connect it to my other mathematical programming projects.
Python, PyPlot and complex-plotting-tools
I found an excellent project on GitHub (https://github.com/artmenlope/complex-plotting-tools) which I decided to use as a starting point, and potentially contribute to in the future. The repo provided a very easy interface for plotting complex-valued functions in a variety of ways. Thanks https://github.com/artmenlope! For example, after importing numpy, matplotlib, and the repo’s cplotting_tools module defining the function and calling cplt.complex_plot3D(x,y,f,log_mode=False) produces the following:
Magnitude and Phase Plot of f(z) from complex-plotting-tools These are all for the same f(z) as above. To view the side-by-side imaginary and real parts of the function, use cplot.plot_re_im(x,y,f,camp=”twilight”,contour=False,alpha=0.9:
Component-Wise Plots from complex-plotting-tools Additionally, the library provides other cool ways to study functions, including a stream plot:
Stream Plot of f(z) from complex-plotting-tools Future Direction
The library shows a lot of promise and is relatively easy to use! It does require a pts variable to be defined that encodes the poles and zeros of the given function. Wolfram does not require this because it computes the locations of these points under the hood. It would save a lot of effort for the user if complex-plotting-tools had this functionality as well. I plan to implement this is into the module in the near future.
In the meantime, have fun plotting with Wolfram and Python, and share your thoughts and questions in comments below, connect with me on LinkedIn or collaborate with me on GitHub!
Unless otherwise noted, all images were created by the author.
Visualizing Complex-Valued Functions Using Python and Mathematica was originally published in Towards Data Science on Medium, where people are continuing the conversation by highlighting and responding to this story.
Originally appeared here:
Visualizing Complex-Valued Functions Using Python and MathematicaGo Here to Read this Fast! Visualizing Complex-Valued Functions Using Python and Mathematica
-
Run ML inference on unplanned and spiky traffic using Amazon SageMaker multi-model endpoints
Amazon SageMaker multi-model endpoints (MMEs) are a fully managed capability of SageMaker inference that allows you to deploy thousands of models on a single endpoint. Previously, MMEs pre-determinedly allocated CPU computing power to models statically regardless the model traffic load, using Multi Model Server (MMS) as its model server. In this post, we discuss a […]Originally appeared here:
Run ML inference on unplanned and spiky traffic using Amazon SageMaker multi-model endpoints