# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1705

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 1706

---

## [Truncated Singular Value Decomposition](https://discourse.julialang.org/t/truncated-singular-value-decomposition/42124)

<div class="topic-metadata">

**Author:** [@Vasily\_Ilin](https://discourse.julialang.org/u/Vasily_Ilin)\
**Replies:** 2\
**Last updated:** [June 27, 2020, 4:03am UTC](https://discourse.julialang.org/t/truncated-singular-value-decomposition/42124 "2020-06-27T04:03:42Z")

</div>

Hi. Given a matrix M I would like to compute its SVD truncated to rank k. I think this is possible without doing the full SVD. For example, Python has this: sklearn.decomposition.TruncatedSVD — scikit-learn 1.1.2 documen…

---

## [Component based modelling with ModelingToolkit.jl](https://discourse.julialang.org/t/component-based-modelling-with-modelingtoolkit-jl/41116)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 1\
**Last updated:** [June 27, 2020, 3:59am UTC](https://discourse.julialang.org/t/component-based-modelling-with-modelingtoolkit-jl/41116 "2020-06-27T03:59:15Z")

</div>

I want to model a simple heating system using ModelingToolkit.jl. It consists of a thermal storage, a boiler and a heat consumer. The following equations govern this model. Thermal Storage The thermal storage has one …

---

## [Conjugate Gradient optimization with set of functions](https://discourse.julialang.org/t/conjugate-gradient-optimization-with-set-of-functions/42070)

<div class="topic-metadata">

**Author:** [@sergevic](https://discourse.julialang.org/u/sergevic)\
**Replies:** 9\
**Last updated:** [June 27, 2020, 3:40am UTC](https://discourse.julialang.org/t/conjugate-gradient-optimization-with-set-of-functions/42070 "2020-06-27T03:40:20Z")

</div>

This post is related to a previous post of mine and I prefered to expose the problem separatey. I have to optimize a set of functions with conjugate gradient optimization, but I have to define the whole set of functions …

---

## [Printing in for loop](https://discourse.julialang.org/t/printing-in-for-loop/42127)

<div class="topic-metadata">

**Author:** [@ehamid](https://discourse.julialang.org/u/ehamid)\
**Replies:** 6\
**Last updated:** [June 26, 2020, 11:57pm UTC](https://discourse.julialang.org/t/printing-in-for-loop/42127 "2020-06-26T23:57:08Z")

</div>

In the following for loop, the cases i = 10,20 for d = 1 are not printed: using LinearAlgebra, Random, Distributions p = 1000 Σ = I(p) X = zeros((p,p)) for d in 1:5 println("\\nd: $d") for i in 1:20 if i …

---

## [Pars a fluctuating parameter in an ODE](https://discourse.julialang.org/t/pars-a-fluctuating-parameter-in-an-ode/42134)

<div class="topic-metadata">

**Author:** [@99dB](https://discourse.julialang.org/u/99dB)\
**Replies:** 4\
**Last updated:** [June 26, 2020, 11:17pm UTC](https://discourse.julialang.org/t/pars-a-fluctuating-parameter-in-an-ode/42134 "2020-06-26T23:17:15Z")

</div>

Dear Julia users, I am new to julia and I want to solve an ODE system with some fluctuating parameters. Let say that I have a fluctuating temperature T as function of time: T = 18 time = collect(0:0.01:365) vecT = T.+…

---

## [OffsetArrays do not work in let blocks as expected](https://discourse.julialang.org/t/offsetarrays-do-not-work-in-let-blocks-as-expected/42130)

<div class="topic-metadata">

**Author:** [@Bogo](https://discourse.julialang.org/u/Bogo)\
**Replies:** 2\
**Last updated:** [June 26, 2020, 10:54pm UTC](https://discourse.julialang.org/t/offsetarrays-do-not-work-in-let-blocks-as-expected/42130 "2020-06-26T22:54:12Z")

</div>

Hi all, I am using OffsetArrays in my work and recently ran into the issue when using let blocks. MWE without OffsetArrays let b = zeros(20,20) a = ones(20) global test function test(p) b .= a .\* p end end o = ones(…

---

## [Illegal CPU instructions when testing GDAL.jl?](https://discourse.julialang.org/t/illegal-cpu-instructions-when-testing-gdal-jl/41922)

<div class="topic-metadata">

**Author:** [@Chen](https://discourse.julialang.org/u/Chen)\
**Replies:** 18\
**Last updated:** [June 26, 2020, 10:35pm UTC](https://discourse.julialang.org/t/illegal-cpu-instructions-when-testing-gdal-jl/41922 "2020-06-26T22:35:42Z")

</div>

Does GDAL come with prebuilt x86\_64 libraries? If yes, it seems that the libraries were built with march that is not x86-64. On my old Pentium 4 CPU, Julia gives an error. I think the error was caused by a CPU instruct…

---

## [ANN: DataConvience.jl v0.1.4 - faster sorting for DataFrames](https://discourse.julialang.org/t/ann-dataconvience-jl-v0-1-4-faster-sorting-for-dataframes/42033)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 6\
**Last updated:** [June 26, 2020, 10:29pm UTC](https://discourse.julialang.org/t/ann-dataconvience-jl-v0-1-4-faster-sorting-for-dataframes/42033 "2020-06-26T22:29:33Z")

</div>

In the latest version of DataConvience.jl you get functions fsort and fsort! for faster sorting of DataFrames. Sorry currently only ascending order sort is possible. Test out the speed difference for yourself! For me I g…

---

## [PkgPage rendering and deployment problems](https://discourse.julialang.org/t/pkgpage-rendering-and-deployment-problems/42133)

<div class="topic-metadata">

**Author:** [@mbaz](https://discourse.julialang.org/u/mbaz)\
**Replies:** 0\
**Last updated:** [June 26, 2020, 9:49pm UTC](https://discourse.julialang.org/t/pkgpage-rendering-and-deployment-problems/42133 "2020-06-26T21:49:05Z")

</div>

I’m using PkgPage to document a small package. I want to deploy manually, and I’m hitting a couple of roadblocks. First, PkgPage is complaining about not finding highlight.js: julia\> PkgPage.optimize() ┌ Warning: I cou…

---

## [Need HTTP.WebSockets documentation](https://discourse.julialang.org/t/need-http-websockets-documentation/39237)

<div class="topic-metadata">

**Author:** [@Laszlo\_Nagy](https://discourse.julialang.org/u/Laszlo_Nagy)\
**Replies:** 0\
**Last updated:** [May 10, 2020, 6:27pm UTC](https://discourse.julialang.org/t/need-http-websockets-documentation/39237 "2020-05-10T18:27:31Z")

</div>

Hello, I’m trying to do something useful with websockets. I’m unable to find its documentation. julia\> import HTTP.WebSockets help?\> HTTP.WebSockets No documentation found. No docstring found for module HTTP.WebSo…

---

## [Two questions about axises for matrix plot](https://discourse.julialang.org/t/two-questions-about-axises-for-matrix-plot/41972)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 2\
**Last updated:** [June 26, 2020, 7:47pm UTC](https://discourse.julialang.org/t/two-questions-about-axises-for-matrix-plot/41972 "2020-06-26T19:47:49Z")

</div>

I have this code plot(1:20,1:20,rand(RGB{Float64}, 20, 20)) Here the y-axis goes from top to bottom, and the x-axis from left to right. But what if I want both to start from the bottom left corner? I can easily transfo…

---

## [Gcc vs Threads.@threads vs Threads.@spawn for large loops](https://discourse.julialang.org/t/gcc-vs-threads-threads-vs-threads-spawn-for-large-loops/34273)

<div class="topic-metadata">

**Author:** [@j-fu](https://discourse.julialang.org/u/j-fu)\
**Replies:** 14\
**Last updated:** [June 26, 2020, 7:45pm UTC](https://discourse.julialang.org/t/gcc-vs-threads-threads-vs-threads-spawn-for-large-loops/34273 "2020-06-26T19:45:03Z")

</div>

Hi, Schönauer vector triad again, see also the benchmarking site of Georg Hager. This time we compare multithreading vs. scalar, and also compare to gcc. Here ist the generating code. We see that for scalar perform…

---

## [Solver time](https://discourse.julialang.org/t/solver-time/42114)

<div class="topic-metadata">

**Author:** [@lausilvag](https://discourse.julialang.org/u/lausilvag)\
**Replies:** 1\
**Last updated:** [June 26, 2020, 7:20pm UTC](https://discourse.julialang.org/t/solver-time/42114 "2020-06-26T19:20:03Z")

</div>

Hi! I have the following problem t3 = time() Z\_OP = Model(with\_optimizer(CPLEX.Optimizer)) t4 = time() if RE ==2 @variable(Z\_OP, 0 \<= x\[l,m\] \<= 1 ) else @variable(Z\_OP, x\[l,m\], Bin) end t5 = time() for i = 1:si…

---

## [Row-wise function application (different functions)](https://discourse.julialang.org/t/row-wise-function-application-different-functions/42076)

<div class="topic-metadata">

**Author:** [@jmurray](https://discourse.julialang.org/u/jmurray)\
**Replies:** 6\
**Last updated:** [June 26, 2020, 6:04pm UTC](https://discourse.julialang.org/t/row-wise-function-application-different-functions/42076 "2020-06-26T18:04:49Z")

</div>

Is there a more elegant / performant / built-in way to do this? Thanks in advance. "Apply each function in f\_array to each element of the corresponding row." function func\_array\_eachrow!(W, f\_array) for i=1:size(W,1…

---

## [Memory allocation and performance](https://discourse.julialang.org/t/memory-allocation-and-performance/42110)

<div class="topic-metadata">

**Author:** [@Joao\_Barata](https://discourse.julialang.org/u/Joao_Barata)\
**Replies:** 7\
**Last updated:** [June 26, 2020, 5:56pm UTC](https://discourse.julialang.org/t/memory-allocation-and-performance/42110 "2020-06-26T17:56:39Z")

</div>

Hi guys, I’m using Julia to compute a dynamic programming model. There is one particular part of the model that takes a long time to run (about 15 seconds, which is a lot, given that there is an iterative procedure invo…

---

## [Expression parser](https://discourse.julialang.org/t/expression-parser/41880)

<div class="topic-metadata">

**Author:** [@alan](https://discourse.julialang.org/u/alan)\
**Replies:** 6\
**Last updated:** [June 26, 2020, 5:55pm UTC](https://discourse.julialang.org/t/expression-parser/41880 "2020-06-26T17:55:59Z")

</div>

I’m trying to port a C package to Julia. The C program uses the “tinyexpr” package to parse expressions provided by the user. For example, a bit of input might look like this: x = 3 y = 4 z = 2 + 3\*x - exp(-y) The x …

---

## [Multiple dispatch explained](https://discourse.julialang.org/t/multiple-dispatch-explained/42117)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 0\
**Last updated:** [June 26, 2020, 5:15pm UTC](https://discourse.julialang.org/t/multiple-dispatch-explained/42117 "2020-06-26T17:15:28Z")

</div>

The first post in a series on Julia basics: What is multiple dispatch with an example and a comparison to function overloading in C++. Critique is still more than welcome :slight\_smile: Also got some on Reddit menti…

---

## [DifferentialEquations.jl Matrix ODE error](https://discourse.julialang.org/t/differentialequations-jl-matrix-ode-error/42074)

<div class="topic-metadata">

**Author:** [@teamtelefunken](https://discourse.julialang.org/u/teamtelefunken)\
**Replies:** 4\
**Last updated:** [June 26, 2020, 3:53pm UTC](https://discourse.julialang.org/t/differentialequations-jl-matrix-ode-error/42074 "2020-06-26T15:53:22Z")

</div>

Hi. I’m trying to use DifferentialEquations.jl, but I’m running into an elementary problem of setting up the ODE (i’m probably incompetent, as i’m new to Julia). I have as my test function a simple system of ODEs. I’m ru…

---

## [Adding more inputs after convolution in Flux?](https://discourse.julialang.org/t/adding-more-inputs-after-convolution-in-flux/42093)

<div class="topic-metadata">

**Author:** [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Replies:** 3\
**Last updated:** [June 26, 2020, 3:35pm UTC](https://discourse.julialang.org/t/adding-more-inputs-after-convolution-in-flux/42093 "2020-06-26T15:35:42Z")

</div>

So I have a large spatial vector as input from which I extract some features using convolution, but I also have some others non-spatial inputs that I’d like to concatenate to my features, is there a way to do that with F…

---

## [Handling KeyError: key “nameOfKey” not found](https://discourse.julialang.org/t/handling-keyerror-key-nameofkey-not-found/42042)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 9\
**Last updated:** [June 26, 2020, 3:34pm UTC](https://discourse.julialang.org/t/handling-keyerror-key-nameofkey-not-found/42042 "2020-06-26T15:34:51Z")

</div>

I have a script that looks through a JSON structure. Every now and again, a particular key is missing. When these instances occur, I need the script to continue rather than stop. Here is my code: for i = 1:length(market…

---

## [A question about PCA and visualization](https://discourse.julialang.org/t/a-question-about-pca-and-visualization/42111)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 1\
**Last updated:** [June 26, 2020, 3:04pm UTC](https://discourse.julialang.org/t/a-question-about-pca-and-visualization/42111 "2020-06-26T15:04:46Z")

</div>

How do I draw a scatter plot using the projection matrix obtained from PCA? thanks!!

---

## [Splat a named tuple before vs after ; in a function call](https://discourse.julialang.org/t/splat-a-named-tuple-before-vs-after-in-a-function-call/42102)

<div class="topic-metadata">

**Author:** [@kschurter](https://discourse.julialang.org/u/kschurter)\
**Replies:** 1\
**Last updated:** [June 26, 2020, 2:43pm UTC](https://discourse.julialang.org/t/splat-a-named-tuple-before-vs-after-in-a-function-call/42102 "2020-06-26T14:43:04Z")

</div>

I did not find this behavior precisely documented elsewhere: f(args...) = sum(args) f(;kwargs...) = typeof(kwargs) f(args...;kwargs...) = args\[1\] + kwargs\[1\] x = (a=1, b=2, c=3) f(x...) # = 6 f(;x...) # = Base.Iterato…

---

## [Augmented neural ODE on GPU](https://discourse.julialang.org/t/augmented-neural-ode-on-gpu/42096)

<div class="topic-metadata">

**Author:** [@SebastianCallh](https://discourse.julialang.org/u/SebastianCallh)\
**Replies:** 2\
**Last updated:** [June 26, 2020, 2:07pm UTC](https://discourse.julialang.org/t/augmented-neural-ode-on-gpu/42096 "2020-06-26T14:07:14Z")

</div>

Trying to run the augumented neural ODE example from the docs and it works great on CPU. However, moving all the parts with the gpu function like when using a regular Flux model does not seem to do the trick. I am getti…

---

## [Is Julia REPL supposed to choke on this?](https://discourse.julialang.org/t/is-julia-repl-supposed-to-choke-on-this/42089)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 13\
**Last updated:** [June 26, 2020, 1:26pm UTC](https://discourse.julialang.org/t/is-julia-repl-supposed-to-choke-on-this/42089 "2020-06-26T13:26:17Z")

</div>

Julia 1.4.2 REPL completely chokes on this expression: let n = 10\_000 struct Sensors depth::NTuple{n, Float32} bottom::Float32 top::Float32 end s = Sensors(ntuple(x-\>0, n), 0, 0) end What is w…

---

## [How to import a local module into another in different separate files](https://discourse.julialang.org/t/how-to-import-a-local-module-into-another-in-different-separate-files/42058)

<div class="topic-metadata">

**Author:** [@abannsunny](https://discourse.julialang.org/u/abannsunny)\
**Replies:** 11\
**Last updated:** [June 26, 2020, 1:00pm UTC](https://discourse.julialang.org/t/how-to-import-a-local-module-into-another-in-different-separate-files/42058 "2020-06-26T13:00:40Z")

</div>

I wanted to know how to import a local module in a file into another in a different file. so for instance, I have a situation like this: #inside main.jl include("M2.jl") include("M1.jl") function DoSomething(inputStr…

---

## [New package for shifting of market data](https://discourse.julialang.org/t/new-package-for-shifting-of-market-data/35026)

<div class="topic-metadata">

**Author:** [@lungben](https://discourse.julialang.org/u/lungben)\
**Replies:** 6\
**Last updated:** [June 26, 2020, 11:34am UTC](https://discourse.julialang.org/t/new-package-for-shifting-of-market-data/35026 "2020-06-26T11:34:14Z")

</div>

Hi, for sensitivity calculation, stress testing or market risk (VaR, etc.) calculation market data items (like interest rate and FX curves) need to be shifted. Often the base items and the shift sizes are not defined o…

---

## [Rational{Int64} variables in JuMP?](https://discourse.julialang.org/t/rational-int64-variables-in-jump/42048)

<div class="topic-metadata">

**Author:** [@GeneralPoxter](https://discourse.julialang.org/u/GeneralPoxter)\
**Replies:** 7\
**Last updated:** [June 26, 2020, 9:51am UTC](https://discourse.julialang.org/t/rational-int64-variables-in-jump/42048 "2020-06-26T09:51:36Z")

</div>

I’ve been trying to make an array of rationals using the @variable macro in JuMP, but I can’t seem to find out how to constrain the array to only rational values. Does JuMP allow you to build variables with Rational typ…

---

## [ERROR: AssertionError: !(isnothing(idx\_agg))](https://discourse.julialang.org/t/error-assertionerror-isnothing-idx-agg/42055)

<div class="topic-metadata">

**Author:** [@hafez\_ahmad](https://discourse.julialang.org/u/hafez_ahmad)\
**Replies:** 1\
**Last updated:** [June 26, 2020, 9:33am UTC](https://discourse.julialang.org/t/error-assertionerror-isnothing-idx-agg/42055 "2020-06-26T09:33:51Z")

</div>

I am using julia 1.4.2. I am trying to make pivot table using aggregate function but showing ERROR: AssertionError: !(isnothing(idx\_agg)) my data frame is like Row │ exp │ amount │ │ │ Float64 │ Stri…

---

## [Cassette.jl only on "high"-level / own defined module functions](https://discourse.julialang.org/t/cassette-jl-only-on-high-level-own-defined-module-functions/42032)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 2\
**Last updated:** [June 26, 2020, 7:51am UTC](https://discourse.julialang.org/t/cassette-jl-only-on-high-level-own-defined-module-functions/42032 "2020-06-26T07:51:41Z")

</div>

I’m wondering whether I can overdup only on functions defined in a module. Basically if my module has the functions a and b, … which do a lot of work I only want to access the calls from one of those functions to another…

---

## [Analyze mathematical functions interactively](https://discourse.julialang.org/t/analyze-mathematical-functions-interactively/42012)

<div class="topic-metadata">

**Author:** [@anon37204545](https://discourse.julialang.org/u/anon37204545)\
**Replies:** 0\
**Last updated:** [June 24, 2020, 9:59pm UTC](https://discourse.julialang.org/t/analyze-mathematical-functions-interactively/42012 "2020-06-24T21:59:20Z")

</div>

I thought it’d be useful to have some starting point for analyzing mathematical functions in Julia, so I wrote a post sharing some of my experience. It goes from plotting to symbolic differentiation. Julia packages are …

[Previous page](https://discourse.julialang.org/latest.md?page=1704)

[Next page](https://discourse.julialang.org/latest.md?page=1706)
