# Latest

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

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

**Page:** 1207

---

## [Reuse Eigen object](https://discourse.julialang.org/t/reuse-eigen-object/71494)

<div class="topic-metadata">

**Author:** [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Replies:** 3\
**Last updated:** [November 15, 2021, 5:43pm UTC](https://discourse.julialang.org/t/reuse-eigen-object/71494 "2021-11-15T17:43:16Z")

</div>

If I do using LinearAlgebra A = randn(100,100) B = A'\*A C = eigen(B) then how could I avoid allocating more memory by the next call to eigen with a 100 by 100 symmetric matrix? In other words, how could I reuse C? (I…

---

## [How to convert Cartesian Index array into a Boolean array?](https://discourse.julialang.org/t/how-to-convert-cartesian-index-array-into-a-boolean-array/71465)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 1\
**Last updated:** [November 15, 2021, 5:39pm UTC](https://discourse.julialang.org/t/how-to-convert-cartesian-index-array-into-a-boolean-array/71465 "2021-11-15T17:39:06Z")

</div>

I have a Cartesian index array like the below: Ind = CartesianIndex{2}\[CartesianIndex(1, 1), CartesianIndex(2, 1), CartesianIndex(3, 1), ...\]; I have an array A with the same number of rows and 35 columns. I want to on…

---

## [\[ANN\] SparkSQL.jl release 1.2.0](https://discourse.julialang.org/t/ann-sparksql-jl-release-1-2-0/71511)

<div class="topic-metadata">

**Author:** [@propelledanalytics](https://discourse.julialang.org/u/propelledanalytics)\
**Replies:** 0\
**Last updated:** [November 15, 2021, 5:01pm UTC](https://discourse.julialang.org/t/ann-sparksql-jl-release-1-2-0/71511 "2021-11-15T17:01:55Z")

</div>

This post is announcing the release of SparkSQL.jl version 1.2.0. SparkSQL.jl is software that enables Julia programs to work with Apache Spark using just SQL. Apache Spark is one of the world’s most ubiquitous open-so…

---

## [How to input complex number in polar coordinate?](https://discourse.julialang.org/t/how-to-input-complex-number-in-polar-coordinate/71502)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 2\
**Last updated:** [November 15, 2021, 3:27pm UTC](https://discourse.julialang.org/t/how-to-input-complex-number-in-polar-coordinate/71502 "2021-11-15T15:27:24Z")

</div>

I have a complex number 25∠10. How can I input it such as polar(magnitude, angle)? what are the functions to convert (from degree to rad) and (rad to degree)?

---

## [Problem understanding results of DiffEqUncertainty](https://discourse.julialang.org/t/problem-understanding-results-of-diffequncertainty/71193)

<div class="topic-metadata">

**Author:** [@MrBellamy](https://discourse.julialang.org/u/MrBellamy)\
**Replies:** 7\
**Last updated:** [November 15, 2021, 1:57pm UTC](https://discourse.julialang.org/t/problem-understanding-results-of-diffequncertainty/71193 "2021-11-15T13:57:55Z")

</div>

I have issues using the librairie DiffEqUncertainty.jl or at least understanding the results. I have a DAE made of 4 differential equations and 1 algebric equations. I defined it using a mass matrix and I am solving it …

---

## [Create a dictionary from Dictionary and Array](https://discourse.julialang.org/t/create-a-dictionary-from-dictionary-and-array/71382)

<div class="topic-metadata">

**Author:** [@jnewbie](https://discourse.julialang.org/u/jnewbie)\
**Replies:** 6\
**Last updated:** [November 15, 2021, 1:05pm UTC](https://discourse.julialang.org/t/create-a-dictionary-from-dictionary-and-array/71382 "2021-11-15T13:05:17Z")

</div>

Hello everyone, I have an array a = \[8,9\] and a dictionary d = Dict(“c” = \[1,3,4,6\] , “b” = \[2,5\]) How can I assign all the values of “c” and “b” to the corresponding values of “c” and “b” in a? Result : h = Dict(“c” …

---

## [Data Scientist/Software Engineer (Analytics, Cloud, Switzerland)](https://discourse.julialang.org/t/data-scientist-software-engineer-analytics-cloud-switzerland/71478)

<div class="topic-metadata">

**Author:** [@unis](https://discourse.julialang.org/u/unis)\
**Replies:** 1\
**Last updated:** [November 15, 2021, 11:38am UTC](https://discourse.julialang.org/t/data-scientist-software-engineer-analytics-cloud-switzerland/71478 "2021-11-15T11:38:33Z")

</div>

We’re building analytics services in the cloud in the context of IoT. We’re based in Switzerland, with two locations (Zürich and near Bern). Could be an interesting opportunity for someone of you. Please get in to…

---

## [\[ANN\] PerfChecker.jl - A small collection of packages performance checking and plotting tools](https://discourse.julialang.org/t/ann-perfchecker-jl-a-small-collection-of-packages-performance-checking-and-plotting-tools/71307)

<div class="topic-metadata">

**Author:** [@Azzaare](https://discourse.julialang.org/u/Azzaare)\
**Replies:** 9\
**Last updated:** [November 15, 2021, 10:59am UTC](https://discourse.julialang.org/t/ann-perfchecker-jl-a-small-collection-of-packages-performance-checking-and-plotting-tools/71307 "2021-11-15T10:59:52Z")

</div>

Hello there! I’m glad to announce that I finally delivered my most “I have no idea what I am doing” based code in Julia as a brand-new package (should be released within half a day). PerfChecker.jl is a collection of s…

---

## [Looking for simple example to explain Ahead of Time Compilation](https://discourse.julialang.org/t/looking-for-simple-example-to-explain-ahead-of-time-compilation/71471)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 6\
**Last updated:** [November 15, 2021, 10:22am UTC](https://discourse.julialang.org/t/looking-for-simple-example-to-explain-ahead-of-time-compilation/71471 "2021-11-15T10:22:16Z")

</div>

In Julia 1.3, this used to work a charm: julia\> add(x, y) = x + y add (generic function with 1 method) julia\> @time add(1, 3) 0.002479 seconds (757 allocations: 45.251 KiB) 4 julia\> @time add(2, 4) 0.000002 second…

---

## [Keep the dictionary unchanged](https://discourse.julialang.org/t/keep-the-dictionary-unchanged/71484)

<div class="topic-metadata">

**Author:** [@jnewbie](https://discourse.julialang.org/u/jnewbie)\
**Replies:** 8\
**Last updated:** [November 15, 2021, 10:29am UTC](https://discourse.julialang.org/t/keep-the-dictionary-unchanged/71484 "2021-11-15T10:29:54Z")

</div>

Hi everyone, I have a dictionary D1 and I´d like to create a new dictionary D2 with the same keys as D1 and by replacing all the values in each key of D1. I did this : for i in 1:length(CT) D2 = Dict(k =\> (D1\[k\] …

---

## [Smoothing Noisy Data using Moving Mean](https://discourse.julialang.org/t/smoothing-noisy-data-using-moving-mean/65329)

<div class="topic-metadata">

**Author:** [@sekarsum](https://discourse.julialang.org/u/sekarsum)\
**Replies:** 9\
**Last updated:** [November 15, 2021, 9:54am UTC](https://discourse.julialang.org/t/smoothing-noisy-data-using-moving-mean/65329 "2021-11-15T09:54:50Z")

</div>

Hi there, Is there a function in Julia that is similar to MATLAB’s smooth() function. MATLAB smooth function: z = smooth(y, span, method) where y → input array; span → span of moving average; method → option between…

---

## [Making code available to workers](https://discourse.julialang.org/t/making-code-available-to-workers/71462)

<div class="topic-metadata">

**Author:** [@jonas-schulze](https://discourse.julialang.org/u/jonas-schulze)\
**Replies:** 2\
**Last updated:** [November 15, 2021, 9:06am UTC](https://discourse.julialang.org/t/making-code-available-to-workers/71462 "2021-11-15T09:06:45Z")

</div>

I tried to make some code, that queries information worker processes, reusable inside a module. Why does the code without a module work just fine, while nested in and exported from a module it does not? # nomodule.jl us…

---

## [User defined functions with AmplNLWriter](https://discourse.julialang.org/t/user-defined-functions-with-amplnlwriter/71482)

<div class="topic-metadata">

**Author:** [@ver\_kh](https://discourse.julialang.org/u/ver_kh)\
**Replies:** 1\
**Last updated:** [November 15, 2021, 8:38am UTC](https://discourse.julialang.org/t/user-defined-functions-with-amplnlwriter/71482 "2021-11-15T08:38:28Z")

</div>

Can user-defined functions be used in JuMP model with AmplNLWriter?

---

## [Adding a new row to a DataFrame](https://discourse.julialang.org/t/adding-a-new-row-to-a-dataframe/1331)

<div class="topic-metadata">

**Author:** [@richthanki](https://discourse.julialang.org/u/richthanki)\
**Replies:** 8\
**Last updated:** [November 15, 2021, 8:34am UTC](https://discourse.julialang.org/t/adding-a-new-row-to-a-dataframe/1331 "2021-11-15T08:34:02Z")

</div>

It’s quite surprising that the DataFrames package documentation doesn’t provide a canonical way of adding a new record to a df. On the web I see approaches using push! append! vcat! and @data macros. Could someone help…

---

## [Pmap, Folds.map and ThreadsX.map perform worse than map for a seemly parallel task](https://discourse.julialang.org/t/pmap-folds-map-and-threadsx-map-perform-worse-than-map-for-a-seemly-parallel-task/71437)

<div class="topic-metadata">

**Author:** [@anneJulia](https://discourse.julialang.org/u/anneJulia)\
**Replies:** 10\
**Last updated:** [November 15, 2021, 8:19am UTC](https://discourse.julialang.org/t/pmap-folds-map-and-threadsx-map-perform-worse-than-map-for-a-seemly-parallel-task/71437 "2021-11-15T08:19:10Z")

</div>

I am trying to parallelize a simple function (doTheTransit in the MWE below). I have opened Julia in the terminal with -p 6 since I have a 6-Core processor. Explanation of my MWE: With the function createNecessary I a…

---

## [How to evaluate(substitute numerical values of params n states) a jacobian in modelingtoolkit using generate\_jacobian or calculate\_jacobian?](https://discourse.julialang.org/t/how-to-evaluate-substitute-numerical-values-of-params-n-states-a-jacobian-in-modelingtoolkit-using-generate-jacobian-or-calculate-jacobian/71466)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 3\
**Last updated:** [November 15, 2021, 8:00am UTC](https://discourse.julialang.org/t/how-to-evaluate-substitute-numerical-values-of-params-n-states-a-jacobian-in-modelingtoolkit-using-generate-jacobian-or-calculate-jacobian/71466 "2021-11-15T08:00:21Z")

</div>

i found that ModelingToolkit.calculate\_jacobian() function symbolically generates Jacobian of ODESystem in MTK docs. How does one substitute numerical values of parameters and state varables numerical values in this mat…

---

## [Can't install package CuArrays](https://discourse.julialang.org/t/cant-install-package-cuarrays/71368)

<div class="topic-metadata">

**Author:** [@Niceno](https://discourse.julialang.org/u/Niceno)\
**Replies:** 5\
**Last updated:** [November 15, 2021, 6:31am UTC](https://discourse.julialang.org/t/cant-install-package-cuarrays/71368 "2021-11-15T06:31:58Z")

</div>

Dear all, I am trying to learn CUDA from the book “CUDA by Example” by Sanders and Kandrot. The book is based on C, so I am translating their examples to Julia. I got stuck at their example 3.2.3, which you can see he…

---

## [Unable to fix a JuMP variable, when it hasn't been fixed](https://discourse.julialang.org/t/unable-to-fix-a-jump-variable-when-it-hasnt-been-fixed/71477)

<div class="topic-metadata">

**Author:** [@chkwon](https://discourse.julialang.org/u/chkwon)\
**Replies:** 1\
**Last updated:** [November 15, 2021, 4:34am UTC](https://discourse.julialang.org/t/unable-to-fix-a-jump-variable-when-it-hasnt-been-fixed/71477 "2021-11-15T04:34:33Z")

</div>

using JuMP m = Model() @variable(m, z \>= 0) @objective(m, Min, z) @show is\_fixed(z) fix(z, 1) The above code generates: is\_fixed(z) = false ERROR: LoadError: Unable to fix z to 1 because it has existing variable bounds…

---

## [Are \`:=\`, \`$=\` operators still supported?](https://discourse.julialang.org/t/are-operators-still-supported/68846)

<div class="topic-metadata">

**Author:** [@o314](https://discourse.julialang.org/u/o314)\
**Replies:** 8\
**Last updated:** [November 15, 2021, 2:46am UTC](https://discourse.julialang.org/t/are-operators-still-supported/68846 "2021-11-15T02:46:50Z")

</div>

Are :=, $= operators still in use today ? If yes is there any examples of their usage. I can get a MWE for both of them . := OPERATOR A = rand(0:100,2,5) A\[:,1:2\] = 1:4 # works ok A := 1:10 # will throws a syntax ER…

---

## [ReactiveX: observer pattern](https://discourse.julialang.org/t/reactivex-observer-pattern/71474)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 2\
**Last updated:** [November 15, 2021, 2:08am UTC](https://discourse.julialang.org/t/reactivex-observer-pattern/71474 "2021-11-15T02:08:59Z")

</div>

I stumbled upon this ReactiveX web page that provides a list of reactive libraries for various languages. Julia is notably missing in the list. Has anyone thought about building something and put it on that list? :wink: …

---

## [Is optimization parallel?](https://discourse.julialang.org/t/is-optimization-parallel/71454)

<div class="topic-metadata">

**Author:** [@Darel](https://discourse.julialang.org/u/Darel)\
**Replies:** 3\
**Last updated:** [November 14, 2021, 10:54pm UTC](https://discourse.julialang.org/t/is-optimization-parallel/71454 "2021-11-14T22:54:54Z")

</div>

Hello, I’m completely new to Julia and wanted to code a simple optimization problem. For a given sparse matrix A (n,m), find sparse matrix X (m,m), minimizing the following objective: L = 1/2 ||A-AX||^2\_F + beta/2 ||X||…

---

## [Switching lines makes results different](https://discourse.julialang.org/t/switching-lines-makes-results-different/71468)

<div class="topic-metadata">

**Author:** [@lumaca](https://discourse.julialang.org/u/lumaca)\
**Replies:** 1\
**Last updated:** [November 14, 2021, 10:17pm UTC](https://discourse.julialang.org/t/switching-lines-makes-results-different/71468 "2021-11-14T22:17:01Z")

</div>

Hi, newbie here. I have found a strange behaviour of the function below, particularly in the two bolded lines. It seems like the two vectors’ elements assume the last computed value at each i iteration, namely l\[k\].g\_ve…

---

## [Typealias with a custom constructor](https://discourse.julialang.org/t/typealias-with-a-custom-constructor/71463)

<div class="topic-metadata">

**Author:** [@owiecc](https://discourse.julialang.org/u/owiecc)\
**Replies:** 6\
**Last updated:** [November 14, 2021, 9:17pm UTC](https://discourse.julialang.org/t/typealias-with-a-custom-constructor/71463 "2021-11-14T21:17:17Z")

</div>

Is there a way to create a type alias with a custom constructor? FloatyMcFloatFace = Float64 FloatyMcFloatFace(x) = new(x+1)

---

## [Request for comments: a roadmap to faster sort() for primitive types using RadixSort](https://discourse.julialang.org/t/request-for-comments-a-roadmap-to-faster-sort-for-primitive-types-using-radixsort/70269)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 32\
**Last updated:** [November 14, 2021, 6:24pm UTC](https://discourse.julialang.org/t/request-for-comments-a-roadmap-to-faster-sort-for-primitive-types-using-radixsort/70269 "2021-11-14T18:24:12Z")

</div>

I have a fast radix sort. Perhaps 1.2–2x faster than SortingAlgorithms’s radix sort according to my very limited benchmarks. SorthingAlgorithms’ is also quite a bit faster than Base’s current defaults, putting the total …

---

## [Error when installing solvers for JuMP](https://discourse.julialang.org/t/error-when-installing-solvers-for-jump/71114)

<div class="topic-metadata">

**Author:** [@jyscao](https://discourse.julialang.org/u/jyscao)\
**Replies:** 4\
**Last updated:** [November 14, 2021, 6:22pm UTC](https://discourse.julialang.org/t/error-when-installing-solvers-for-jump/71114 "2021-11-14T18:22:56Z")

</div>

When I try to install one of the commonly used solvers like Cbc, Cpl or GLPK, I’d get the error message: dependencies errored. To see a full report either run import Pkg; Pkg.precompile() or load the packages. And when I…

---

## [Training sentence transformers in Julia?](https://discourse.julialang.org/t/training-sentence-transformers-in-julia/71460)

<div class="topic-metadata">

**Author:** [@Alex\_Tantos](https://discourse.julialang.org/u/Alex_Tantos)\
**Replies:** 0\
**Last updated:** [November 14, 2021, 3:57pm UTC](https://discourse.julialang.org/t/training-sentence-transformers-in-julia/71460 "2021-11-14T15:57:45Z")

</div>

Hi! Has anyone tried to train a sentence transformer by fine tuning BERT in julia following the method of the 2019 paper on sentence transformers (and the model is called SBERT)? I know this is too general a question, b…

---

## [1-Column matrix vs. Vector](https://discourse.julialang.org/t/1-column-matrix-vs-vector/71440)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 19\
**Last updated:** [November 14, 2021, 4:11pm UTC](https://discourse.julialang.org/t/1-column-matrix-vs-vector/71440 "2021-11-14T16:11:43Z")

</div>

Here is a real world example: a = Float64\[-159.5; -158.5; -39.5;;\] typeof(a) Matrix{Float64} (alias for Array{Float64, 2}) size(a) (3, 1) b = vec(a) b = Float64\[-159.5, -158.5, -39.5\] typeof(b) Vector{Float64} (alias f…

---

## [Line feed by spaces](https://discourse.julialang.org/t/line-feed-by-spaces/71439)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 11\
**Last updated:** [November 14, 2021, 3:44pm UTC](https://discourse.julialang.org/t/line-feed-by-spaces/71439 "2021-11-14T15:44:58Z")

</div>

hello, can you tell me how to make a better function that performs line feeds by spaces, than what I did with my natural science education, i, j, l and += 1 ? function feed\_lines(str::String, l::Int) chars = collect…

---

## [Is PyCall slower than directly using Python?](https://discourse.julialang.org/t/is-pycall-slower-than-directly-using-python/71110)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 10\
**Last updated:** [November 14, 2021, 1:03pm UTC](https://discourse.julialang.org/t/is-pycall-slower-than-directly-using-python/71110 "2021-11-14T13:03:42Z")

</div>

I was trying to benchmark some operations in python and since I wanted to do the metaanalysis in a Julia notebook, I found it convenient to use PyCall. I know that PyCall puts some extra overhead on the object conversio…

---

## [How to add package from a folder (not registered) into the the project?](https://discourse.julialang.org/t/how-to-add-package-from-a-folder-not-registered-into-the-the-project/71386)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 10\
**Last updated:** [November 14, 2021, 1:01pm UTC](https://discourse.julialang.org/t/how-to-add-package-from-a-folder-not-registered-into-the-the-project/71386 "2021-11-14T13:01:19Z")

</div>

I am trying to add a package called MyModule (I have designed it) but I am not being able to (@v1.6) pkg\> add MyModule ERROR: The following package names could not be resolved: \* MyModule (not found in project, manifes…

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

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