# Latest

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

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

**Page:** 1697

---

## [Are type constraints in certain method definitions in LinearAlgebra necessary?](https://discourse.julialang.org/t/are-type-constraints-in-certain-method-definitions-in-linearalgebra-necessary/42670)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [July 7, 2020, 12:40pm UTC](https://discourse.julialang.org/t/are-type-constraints-in-certain-method-definitions-in-linearalgebra-necessary/42670 "2020-07-07T12:40:18Z")

</div>

Eg getindex for adjoint and transpose: @propagate\_inbounds getindex(A::AdjOrTransAbsMat, i::Int, j::Int) = wrapperop(A)(A.parent\[j, i\]) Why do i and j need to be constrained to Ints? They may in principle be anything t…

---

## [Fast short Float32 vector](https://discourse.julialang.org/t/fast-short-float32-vector/42648)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 9\
**Last updated:** [July 7, 2020, 9:39am UTC](https://discourse.julialang.org/t/fast-short-float32-vector/42648 "2020-07-07T09:39:54Z")

</div>

SIMD.jl package offers ultimate in speed for short vectors on x64 CPU: aa = SIMD.Vec{4,Float32}((3, 1, 4, 1)) bb = SIMD.Vec{4,Float32}((4, 7, 2, 9)) function foo(a, b) a+b end julia\> @code\_native debuginfo=:none …

---

## [ModelingToolkit: Symbolic Calculations and Building Fast Parallel Functions](https://discourse.julialang.org/t/modelingtoolkit-symbolic-calculations-and-building-fast-parallel-functions/42647)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 1\
**Last updated:** [July 7, 2020, 10:40am UTC](https://discourse.julialang.org/t/modelingtoolkit-symbolic-calculations-and-building-fast-parallel-functions/42647 "2020-07-07T10:40:46Z")

</div>

https://mtk.sciml.ai/dev/tutorials/symbolic\_functions/ ModelingToolkit has been quite a bit of an enigma of a library to explain, but hopefully this new first tutorials helps people understand ModelingToolkit as a symbo…

---

## [NamedArrays vs NamedTuples vs Dict in objective function to optimization](https://discourse.julialang.org/t/namedarrays-vs-namedtuples-vs-dict-in-objective-function-to-optimization/42659)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 6\
**Last updated:** [July 7, 2020, 9:39am UTC](https://discourse.julialang.org/t/namedarrays-vs-namedtuples-vs-dict-in-objective-function-to-optimization/42659 "2020-07-07T09:39:25Z")

</div>

I am optimizing a function that takes a vector of size ~300 as input. That objective function calls several other functions that each use a subset of the input vector. An example of that setup is below: function mainpro…

---

## [Sign restrictions on structural VARs](https://discourse.julialang.org/t/sign-restrictions-on-structural-vars/39268)

<div class="topic-metadata">

**Author:** [@donk\_fish](https://discourse.julialang.org/u/donk_fish)\
**Replies:** 5\
**Last updated:** [July 7, 2020, 8:11am UTC](https://discourse.julialang.org/t/sign-restrictions-on-structural-vars/39268 "2020-07-07T08:11:20Z")

</div>

Good morning, I’m curious how far Julia has gotten with libraries to estimate various types of (S)VAR models? For example, is there a library that implements sign restrictions? I couldn’t find anything by searching.

---

## [Using ForwardDiff on qr factorization](https://discourse.julialang.org/t/using-forwarddiff-on-qr-factorization/42625)

<div class="topic-metadata">

**Author:** [@aross](https://discourse.julialang.org/u/aross)\
**Replies:** 11\
**Last updated:** [July 7, 2020, 6:45am UTC](https://discourse.julialang.org/t/using-forwarddiff-on-qr-factorization/42625 "2020-07-07T06:45:09Z")

</div>

I am doing a linear least-squares optimization on a function by using QR factorization. I wish to find the gradient so that I can optimize a different parameter, but I am running into trouble when passing qr() to Forward…

---

## [Is it possible to have an empty array of \>2 dims?](https://discourse.julialang.org/t/is-it-possible-to-have-an-empty-array-of-2-dims/42658)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 4\
**Last updated:** [July 7, 2020, 6:39am UTC](https://discourse.julialang.org/t/is-it-possible-to-have-an-empty-array-of-2-dims/42658 "2020-07-07T06:39:20Z")

</div>

The function show\_nd in arrayshow.jl starts with this: function show\_nd(io::IO, a::AbstractArray, print\_matrix::Function, label\_slices::Bool) limit::Bool = get(io, :limit, false) if isempty(a) return …

---

## [A good way to filter an array with keeping its dimension](https://discourse.julialang.org/t/a-good-way-to-filter-an-array-with-keeping-its-dimension/42603)

<div class="topic-metadata">

**Author:** [@SSU](https://discourse.julialang.org/u/SSU)\
**Replies:** 4\
**Last updated:** [July 7, 2020, 5:58am UTC](https://discourse.julialang.org/t/a-good-way-to-filter-an-array-with-keeping-its-dimension/42603 "2020-07-07T05:58:01Z")

</div>

I want to filter nothing in an array with keeping its dimension. Is there any better way to do this other than using reshape()? x = \[ -0.240487 1.72634 -0.946312 0.915657 0.497511 3.77469 -1.63141…

---

## [Can an array have new elements added to it on the fly?](https://discourse.julialang.org/t/can-an-array-have-new-elements-added-to-it-on-the-fly/42653)

<div class="topic-metadata">

**Author:** [@fusion809](https://discourse.julialang.org/u/fusion809)\
**Replies:** 4\
**Last updated:** [July 7, 2020, 5:19am UTC](https://discourse.julialang.org/t/can-an-array-have-new-elements-added-to-it-on-the-fly/42653 "2020-07-07T05:19:33Z")

</div>

I’m writing a Runge-Kutta-Fehlberg solver (and yes I know that ODE.jl has one already, this is something I’m doing to learn more about both Julia and the method) and as the step sizes are adaptive it is not clear from th…

---

## [Question about TimeSeriesClustering.jl](https://discourse.julialang.org/t/question-about-timeseriesclustering-jl/42650)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 2\
**Last updated:** [July 7, 2020, 2:24am UTC](https://discourse.julialang.org/t/question-about-timeseriesclustering-jl/42650 "2020-07-07T02:24:01Z")

</div>

using TimeSeriesClustering,CSV #input\_data=load\_timeseries\_data(:GEP\_GER1) ts\_input\_data = load\_timeseries\_data(:CEP\_GER1; T=24, years=\[2016\]) When I run the code, Julia always displays the time series in my REPL. How …

---

## [Evaluation, gradient and Hessian of a scalar function for multiple values using ForwardDiff.jl](https://discourse.julialang.org/t/evaluation-gradient-and-hessian-of-a-scalar-function-for-multiple-values-using-forwarddiff-jl/42641)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 5\
**Last updated:** [July 7, 2020, 1:36am UTC](https://discourse.julialang.org/t/evaluation-gradient-and-hessian-of-a-scalar-function-for-multiple-values-using-forwarddiff-jl/42641 "2020-07-07T01:36:25Z")

</div>

Hello, I would like to evaluate a scalar-function f: R \\xrightarrow{} R as well as its derivative and hessian at around 200 values using ForwardDiff.jl To speed-up the computations, is it possible to precompute an obje…

---

## [Tangents in Luxor.jl](https://discourse.julialang.org/t/tangents-in-luxor-jl/42170)

<div class="topic-metadata">

**Author:** [@turtle](https://discourse.julialang.org/u/turtle)\
**Replies:** 8\
**Last updated:** [July 7, 2020, 12:59am UTC](https://discourse.julialang.org/t/tangents-in-luxor-jl/42170 "2020-07-07T00:59:51Z")

</div>

I am still learning Luxor. I find two in-built tangent functions: circletangent2circles() makes circles of a particular radius tangential to two circles circlepointtangent() makes circles of a particular radius pass…

---

## [Performance of views vs. explicit index referencing](https://discourse.julialang.org/t/performance-of-views-vs-explicit-index-referencing/42644)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 2\
**Last updated:** [July 7, 2020, 12:07am UTC](https://discourse.julialang.org/t/performance-of-views-vs-explicit-index-referencing/42644 "2020-07-07T00:07:57Z")

</div>

I spent some time trying to understand the advantages and disadvantages of using views in my code. The main reason for using views, in my case, was simplifying the code, by (as one example), having only one method to com…

---

## [Stochastic gradient descent](https://discourse.julialang.org/t/stochastic-gradient-descent/42642)

<div class="topic-metadata">

**Author:** [@A.U.M](https://discourse.julialang.org/u/A.U.M)\
**Replies:** 0\
**Last updated:** [July 6, 2020, 9:32pm UTC](https://discourse.julialang.org/t/stochastic-gradient-descent/42642 "2020-07-06T21:32:20Z")

</div>

Hello, I am working on implementing a function SGD ( Stochastic gradient descent ) I did it like the following but I want to Parallelize the for loop over all batches in the function in an optimum way can anyone help? …

---

## [Can't install "MultivariateMoments", error: unable to automatically install "XML2"](https://discourse.julialang.org/t/cant-install-multivariatemoments-error-unable-to-automatically-install-xml2/42623)

<div class="topic-metadata">

**Author:** [@aliceee](https://discourse.julialang.org/u/aliceee)\
**Replies:** 8\
**Last updated:** [July 6, 2020, 8:46pm UTC](https://discourse.julialang.org/t/cant-install-multivariatemoments-error-unable-to-automatically-install-xml2/42623 "2020-07-06T20:46:47Z")

</div>

Hi, I was trying to install the package “MultivariateMoments”. import Pkg; Pkg.add("MultivariateMoments") It failed with the following error: Unable to automatically install 'XML2' from '/Users/My\_Name/.julia/packages…

---

## [Delayed rejection adaptive metropolis](https://discourse.julialang.org/t/delayed-rejection-adaptive-metropolis/42632)

<div class="topic-metadata">

**Author:** [@Nimpa](https://discourse.julialang.org/u/Nimpa)\
**Replies:** 1\
**Last updated:** [July 6, 2020, 7:39pm UTC](https://discourse.julialang.org/t/delayed-rejection-adaptive-metropolis/42632 "2020-07-06T19:39:36Z")

</div>

I have been trying to write a julia code for the delayed rejection adaptive metropolis algorithm to no avail. Can anyone help

---

## [Optlevel with submodule](https://discourse.julialang.org/t/optlevel-with-submodule/42628)

<div class="topic-metadata">

**Author:** [@matthieu](https://discourse.julialang.org/u/matthieu)\
**Replies:** 2\
**Last updated:** [July 6, 2020, 6:37pm UTC](https://discourse.julialang.org/t/optlevel-with-submodule/42628 "2020-07-06T18:37:01Z")

</div>

I have a package that creates a submodule. I would like to use the optimization level 1 for everything except the submodule. If I use the code module MyPackage if isdefined(Base, :Experimental) && isdefined(Base.Expe…

---

## [Polynomial optimization problem can't deal with redundant constraints](https://discourse.julialang.org/t/polynomial-optimization-problem-cant-deal-with-redundant-constraints/41839)

<div class="topic-metadata">

**Author:** [@aliceee](https://discourse.julialang.org/u/aliceee)\
**Replies:** 1\
**Last updated:** [June 25, 2020, 7:12am UTC](https://discourse.julialang.org/t/polynomial-optimization-problem-cant-deal-with-redundant-constraints/41839 "2020-06-25T07:12:44Z")

</div>

I’m exploring the following polynomial optimization problem: using SumOfSquares using DynamicPolynomials using MosekTools # Create symbolic variables (not JuMP decision variables) @polyvar x1 x2 # Create a Sum of Squa…

---

## [How to make interpolated contour plot?](https://discourse.julialang.org/t/how-to-make-interpolated-contour-plot/42616)

<div class="topic-metadata">

**Author:** [@hafez\_ahmad](https://discourse.julialang.org/u/hafez_ahmad)\
**Replies:** 1\
**Last updated:** [July 6, 2020, 3:57pm UTC](https://discourse.julialang.org/t/how-to-make-interpolated-contour-plot/42616 "2020-07-06T15:57:35Z")

</div>

I am sorry and I am posting again, I like to make an interpolated contour plot. I have tried and haven’t work. Inverse distance weighting will be preferred interpolation method. my data looks like that \> first(df,5)…

---

## [Control point location via a slide in Makie](https://discourse.julialang.org/t/control-point-location-via-a-slide-in-makie/42617)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 0\
**Last updated:** [July 6, 2020, 3:33pm UTC](https://discourse.julialang.org/t/control-point-location-via-a-slide-in-makie/42617 "2020-07-06T15:33:39Z")

</div>

Here is an MWE that draws three points on a 2D graph. I would like to control the x-value of the 1st point via a text slider. using Makie s1, v1 = textslider(0.00f0:.1f0:1.0f0, "Variable", start = 0.5f0) # Draw three p…

---

## [Immutable allocation in Julia v1.5?](https://discourse.julialang.org/t/immutable-allocation-in-julia-v1-5/42598)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 2\
**Last updated:** [July 6, 2020, 3:11pm UTC](https://discourse.julialang.org/t/immutable-allocation-in-julia-v1-5/42598 "2020-07-06T15:11:57Z")

</div>

With Julia v1.5, is it correct to say that standalone (not part of an array or mutable struct) local immutable values, and all their immutable fields, are now always stack-allocated? Or are there cases where that might n…

---

## [The tracked parameters are not updated during Flux.training](https://discourse.julialang.org/t/the-tracked-parameters-are-not-updated-during-flux-training/42507)

<div class="topic-metadata">

**Author:** [@yanz4](https://discourse.julialang.org/u/yanz4)\
**Replies:** 2\
**Last updated:** [July 6, 2020, 2:55pm UTC](https://discourse.julialang.org/t/the-tracked-parameters-are-not-updated-during-flux-training/42507 "2020-07-06T14:55:40Z")

</div>

I’m building an oscillator defined by ODE. The purpose is to use Flux training to optimize parameters in ODE, i.e. the R and C value of the oscillator, given loss function. using Flux, DifferentialEquations, DiffEqSensi…

---

## [Get JuliaDB.loadtable to parse all columns in CSVs as String](https://discourse.julialang.org/t/get-juliadb-loadtable-to-parse-all-columns-in-csvs-as-string/40620)

<div class="topic-metadata">

**Author:** [@anon64288406](https://discourse.julialang.org/u/anon64288406)\
**Replies:** 5\
**Last updated:** [July 6, 2020, 2:51pm UTC](https://discourse.julialang.org/t/get-juliadb-loadtable-to-parse-all-columns-in-csvs-as-string/40620 "2020-07-06T14:51:17Z")

</div>

I’m using Julia 1.4. I want to use JuliaDB.jl, specifically, to read a bunch of CSVs and combine them into one big DataFrame. Here’s the issue: When reading the CSVs, I want all columns to be parsed as String. The numbe…

---

## [Hiring Senior Deep Learning Expert & Senior Deep Learning Team Lead](https://discourse.julialang.org/t/hiring-senior-deep-learning-expert-senior-deep-learning-team-lead/42614)

<div class="topic-metadata">

**Author:** [@jsufana](https://discourse.julialang.org/u/jsufana)\
**Replies:** 0\
**Last updated:** [July 6, 2020, 2:37pm UTC](https://discourse.julialang.org/t/hiring-senior-deep-learning-expert-senior-deep-learning-team-lead/42614 "2020-07-06T14:37:57Z")

</div>

contextflow develops software for radiologists to improve their daily workflow. We are currently hiring two senior deep learning positions. Based in Vienna but remote work possible. Jobs Archive - contextflow

---

## [Question about data analysis](https://discourse.julialang.org/t/question-about-data-analysis/42605)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 5\
**Last updated:** [July 6, 2020, 1:24pm UTC](https://discourse.julialang.org/t/question-about-data-analysis/42605 "2020-07-06T13:24:19Z")

</div>

Does Julia have a Pkg or methods that can process temporal data and extract relevant features? thanks!!!

---

## [Threading: Array comprehension vs. fill](https://discourse.julialang.org/t/threading-array-comprehension-vs-fill/42604)

<div class="topic-metadata">

**Author:** [@jonas-kr](https://discourse.julialang.org/u/jonas-kr)\
**Replies:** 3\
**Last updated:** [July 6, 2020, 1:09pm UTC](https://discourse.julialang.org/t/threading-array-comprehension-vs-fill/42604 "2020-07-06T13:09:25Z")

</div>

I have noticed a very strange issue, which occurs in julia 1.4.2 on Windows 10. I have neither been able to reproduce it on Fedora 32 with julia 1.4.2 nor on Ubuntu 20.04 (WSL2) with julia 1.4.1. Define two functions: f…

---

## [All Vectors with Entries from a Given Array](https://discourse.julialang.org/t/all-vectors-with-entries-from-a-given-array/40679)

<div class="topic-metadata">

**Author:** [@python15](https://discourse.julialang.org/u/python15)\
**Replies:** 7\
**Last updated:** [July 6, 2020, 12:17pm UTC](https://discourse.julialang.org/t/all-vectors-with-entries-from-a-given-array/40679 "2020-07-06T12:17:39Z")

</div>

Hey! I have the following question: Given an array of numbers, say A = \[0, 1, 3\], what is the best way to get all vectors (arrays) of fix length with entries from A? So in other words, I want to get all vectors from the…

---

## [A question about the "K" of kmeans](https://discourse.julialang.org/t/a-question-about-the-k-of-kmeans/42600)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 3\
**Last updated:** [July 6, 2020, 11:20am UTC](https://discourse.julialang.org/t/a-question-about-the-k-of-kmeans/42600 "2020-07-06T11:20:27Z")

</div>

What methods can assist in determining the number of classes in a cluster?what Pkg? thanks!!!

---

## [Using Iterators.rest to iterate over a range](https://discourse.julialang.org/t/using-iterators-rest-to-iterate-over-a-range/42597)

<div class="topic-metadata">

**Author:** [@andrewellis](https://discourse.julialang.org/u/andrewellis)\
**Replies:** 3\
**Last updated:** [July 6, 2020, 10:48am UTC](https://discourse.julialang.org/t/using-iterators-rest-to-iterate-over-a-range/42597 "2020-07-06T10:48:41Z")

</div>

Can anyone explain why Iterators.rest(\[1, 2, 3\], 2) |\> collect results in 2-element Array{Int64,1}: 2 3 but Iterators.rest(1:3, 2) |\> collect returns 1-element Array{Int64,1}: 3 ?

---

## [A question about my Plots.scatter](https://discourse.julialang.org/t/a-question-about-my-plots-scatter/42594)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 2\
**Last updated:** [July 6, 2020, 10:04am UTC](https://discourse.julialang.org/t/a-question-about-my-plots-scatter/42594 "2020-07-06T10:04:33Z")

</div>

using CSV,DataFrames,Statistics,StatsBase,TimeSeries,Plots #Clustering,Gadfly,Statistics,DataFrames,Plots,StatsBase,FFTW,MultivariateStats,BetaML data=CSV.read("D:\\\\mycode\\\\code\\\\数据.csv") MD=data\[96412:96775,:\] load=con…

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

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