# Latest

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

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

**Page:** 1159

---

## [Default value that doesn't correspond to an argument type](https://discourse.julialang.org/t/default-value-that-doesnt-correspond-to-an-argument-type/74212)

<div class="topic-metadata">

**Author:** [@serhii](https://discourse.julialang.org/u/serhii)\
**Replies:** 1\
**Last updated:** [January 7, 2022, 7:47pm UTC](https://discourse.julialang.org/t/default-value-that-doesnt-correspond-to-an-argument-type/74212 "2022-01-07T19:47:54Z")

</div>

Hi! Can someone explain why julia compiler allows the following function declaration: fun(arg::String=nothing) = arg Which is quite confusing especially considering that julia itself claims that there are two methods f…

---

## [Error in installation with jill in Windows](https://discourse.julialang.org/t/error-in-installation-with-jill-in-windows/74203)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 2\
**Last updated:** [January 7, 2022, 7:16pm UTC](https://discourse.julialang.org/t/error-in-installation-with-jill-in-windows/74203 "2022-01-07T19:16:51Z")

</div>

I have installed Julia 1.7.1 on Windows 10. Now when using the bash terminal I need to do julia.cmd (with the extension cmd) to run Julia. This never happened to me before. It does not happen when I use PowerShell or cm…

---

## [Is the least significant bit from bitstring() correct?](https://discourse.julialang.org/t/is-the-least-significant-bit-from-bitstring-correct/74206)

<div class="topic-metadata">

**Author:** [@g2g](https://discourse.julialang.org/u/g2g)\
**Replies:** 1\
**Last updated:** [January 7, 2022, 6:36pm UTC](https://discourse.julialang.org/t/is-the-least-significant-bit-from-bitstring-correct/74206 "2022-01-07T18:36:28Z")

</div>

I don’t know if this is a bug but it isn’t what I was expecting: julia\> bitstring(Float32(0.777777777777777777777777777777777777777777777777)) "00111111010001110001110001110010" julia\> bitstring(Float64(0.7777777777777…

---

## [Bad performance: using OOP with for loops to identify substring](https://discourse.julialang.org/t/bad-performance-using-oop-with-for-loops-to-identify-substring/74167)

<div class="topic-metadata">

**Author:** [@candidaorelmex](https://discourse.julialang.org/u/candidaorelmex)\
**Replies:** 8\
**Last updated:** [January 7, 2022, 5:38pm UTC](https://discourse.julialang.org/t/bad-performance-using-oop-with-for-loops-to-identify-substring/74167 "2022-01-07T17:38:33Z")

</div>

Hi Julia community, I have two long lists: one contains long strings, the other one short strings. I need to identify which short strings can be found in which long strings - we need to test all possible “long string”-“…

---

## [Apply interpolation functions on columns of a dataframe](https://discourse.julialang.org/t/apply-interpolation-functions-on-columns-of-a-dataframe/71257)

<div class="topic-metadata">

**Author:** [@corny85](https://discourse.julialang.org/u/corny85)\
**Replies:** 17\
**Last updated:** [January 7, 2022, 5:10pm UTC](https://discourse.julialang.org/t/apply-interpolation-functions-on-columns-of-a-dataframe/71257 "2022-01-07T17:10:09Z")

</div>

Hello, I’m a beginner in Julia… i have: a dataframe with 4 columns and 10 rows three functions u1, u2, u3 a vector of 3 weights And i want to create a function (arguments : the dataframe, the 3 functions and the wei…

---

## [Getting bins from Plots.jl histogram](https://discourse.julialang.org/t/getting-bins-from-plots-jl-histogram/55452)

<div class="topic-metadata">

**Author:** [@OvidiusCicero](https://discourse.julialang.org/u/OvidiusCicero)\
**Replies:** 13\
**Last updated:** [January 7, 2022, 4:57pm UTC](https://discourse.julialang.org/t/getting-bins-from-plots-jl-histogram/55452 "2022-01-07T16:57:02Z")

</div>

I can make a histogram plot by histogram(rand(1000)) Can I get the values of the resulting binning?

---

## [Faster alternate to @views for passing subarrays to functions](https://discourse.julialang.org/t/faster-alternate-to-views-for-passing-subarrays-to-functions/74195)

<div class="topic-metadata">

**Author:** [@Arpit\_Babbar](https://discourse.julialang.org/u/Arpit_Babbar)\
**Replies:** 3\
**Last updated:** [January 7, 2022, 4:39pm UTC](https://discourse.julialang.org/t/faster-alternate-to-views-for-passing-subarrays-to-functions/74195 "2022-01-07T16:39:33Z")

</div>

Hi, I have got 4 arrays a,b,c,d each of size nvar X nx where nvar is a small Int64, but nx is a pretty large Int64. I wish to iteratively act a function over the arguments (a\[:,i\],a\[:,i-1\],a\[:,i+1\],b\[:,i\],b\[:,i-1\],b\[:,i+…

---

## [How to add values in a dictionary of lists?](https://discourse.julialang.org/t/how-to-add-values-in-a-dictionary-of-lists/74192)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 10\
**Last updated:** [January 7, 2022, 3:53pm UTC](https://discourse.julialang.org/t/how-to-add-values-in-a-dictionary-of-lists/74192 "2022-01-07T15:53:22Z")

</div>

Hello, good morning. How to add values in a dictionary that has type (int, vector(int))? Cant understand the error about conversion ERROR: LoadError: MethodError: Cannot \`convert\` an object of type Int64 to an object o…

---

## [ReadOnlyMemoryError() in an ODEProblem](https://discourse.julialang.org/t/readonlymemoryerror-in-an-odeproblem/74189)

<div class="topic-metadata">

**Author:** [@Frazze](https://discourse.julialang.org/u/Frazze)\
**Replies:** 6\
**Last updated:** [January 7, 2022, 2:58pm UTC](https://discourse.julialang.org/t/readonlymemoryerror-in-an-odeproblem/74189 "2022-01-07T14:58:23Z")

</div>

Hi everyone I’m studying a pde (swift-hohenberg model) converting it in the ODE form. I’ve discretized the laplacian: function Laplacian2D(Nx, lx) hx = lx/Nx D2x = CenteredDifference(2, 2, hx, Nx) Qx = Periodi…

---

## [\[Review wanted\] Adam gradient descent with complicated gradient to fit multivariate gamma convolutions](https://discourse.julialang.org/t/review-wanted-adam-gradient-descent-with-complicated-gradient-to-fit-multivariate-gamma-convolutions/74183)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 2\
**Last updated:** [January 7, 2022, 2:33pm UTC](https://discourse.julialang.org/t/review-wanted-adam-gradient-descent-with-complicated-gradient-to-fit-multivariate-gamma-convolutions/74183 "2022-01-07T14:33:11Z")

</div>

Hi, I have written a code that fits a multivariate gamma convolution to a dataset using a stochastic gradient descent on a home-made loss. Most of the code is directed into the computation of the gradient, which is of c…

---

## [How to print a backtrace?](https://discourse.julialang.org/t/how-to-print-a-backtrace/74164)

<div class="topic-metadata">

**Author:** [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Replies:** 3\
**Last updated:** [January 7, 2022, 2:21pm UTC](https://discourse.julialang.org/t/how-to-print-a-backtrace/74164 "2022-01-07T14:21:46Z")

</div>

How can I print an error and backtrace from within a catch block, the same as if it had not been caught in the REPL?

---

## [Add new field to struct?](https://discourse.julialang.org/t/add-new-field-to-struct/73923)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 11\
**Last updated:** [January 7, 2022, 2:06pm UTC](https://discourse.julialang.org/t/add-new-field-to-struct/73923 "2022-01-07T14:06:03Z")

</div>

Hello! Is there any way to add a field to an already defined struct? I have a case where I have no idea of how many fields I will need, so I would like to be able to do something similar to Matlab’s structs i.e: Matlab…

---

## [String subscript given as integer](https://discourse.julialang.org/t/string-subscript-given-as-integer/17814)

<div class="topic-metadata">

**Author:** [@mforets](https://discourse.julialang.org/u/mforets)\
**Replies:** 6\
**Last updated:** [January 7, 2022, 2:12pm UTC](https://discourse.julialang.org/t/string-subscript-given-as-integer/17814 "2022-01-07T14:12:15Z")

</div>

I’d like to write a function f(n::Int)::String such that f(1) = "x₁", f(2) = "x₂" and so on (assume 1\<=n\<=9 for simplicity). Since julia\> 'x' \* '\\u2081' "x₁" Let n=3; the syntax 'x' \* '\\u' \* string(n + 2080) is invali…

---

## [Performance assigning and copying with StaticArrays.jl](https://discourse.julialang.org/t/performance-assigning-and-copying-with-staticarrays-jl/74182)

<div class="topic-metadata">

**Author:** [@drandran12](https://discourse.julialang.org/u/drandran12)\
**Replies:** 4\
**Last updated:** [January 7, 2022, 1:12pm UTC](https://discourse.julialang.org/t/performance-assigning-and-copying-with-staticarrays-jl/74182 "2022-01-07T13:12:54Z")

</div>

I was thinking of using the package StaticArrays.jl to enhance the performance of my code. However, I only use arrays to store computed variables and use them later after certain conditions are set. Hence, I was benchmar…

---

## [Issues with Plots.contourf and logarithmic axes](https://discourse.julialang.org/t/issues-with-plots-contourf-and-logarithmic-axes/74185)

<div class="topic-metadata">

**Author:** [@leapsheep](https://discourse.julialang.org/u/leapsheep)\
**Replies:** 1\
**Last updated:** [January 7, 2022, 12:11pm UTC](https://discourse.julialang.org/t/issues-with-plots-contourf-and-logarithmic-axes/74185 "2022-01-07T12:11:15Z")

</div>

The contourf function behaves very strangely when plotting data points on a logarithmic grid. Supplying the x- and y-positions of the data points and setting scale=:log10 completely messes up the plot. Here is a minimal …

---

## [Trying to print to a file from python using Pluto PyCall](https://discourse.julialang.org/t/trying-to-print-to-a-file-from-python-using-pluto-pycall/74165)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 2\
**Last updated:** [January 7, 2022, 8:11am UTC](https://discourse.julialang.org/t/trying-to-print-to-a-file-from-python-using-pluto-pycall/74165 "2022-01-07T08:11:46Z")

</div>

Hi all I am using Pluto and PyCall to run a whole python script which prints a stream of data to a file, using an asynch loop which I just check using tail. If I run it in REPL it works like a champ but in Pluto there …

---

## [Dates DateTime parse string with microseconds (decimal 6 places)](https://discourse.julialang.org/t/dates-datetime-parse-string-with-microseconds-decimal-6-places/25653)

<div class="topic-metadata">

**Author:** [@Joshua\_Bowles](https://discourse.julialang.org/u/Joshua_Bowles)\
**Replies:** 3\
**Last updated:** [January 7, 2022, 9:48am UTC](https://discourse.julialang.org/t/dates-datetime-parse-string-with-microseconds-decimal-6-places/25653 "2022-01-07T09:48:11Z")

</div>

I’ve got files to import with postgres formatted timestamps to the microseconds (6 digits). I’m unable to find the proper date format. I’ve looked through Dates/test/io.jl as well in this forum. Curious if I’m missing so…

---

## [Turing with ODE model using dualcache causes error](https://discourse.julialang.org/t/turing-with-ode-model-using-dualcache-causes-error/74166)

<div class="topic-metadata">

**Author:** [@jacobusmmsmit](https://discourse.julialang.org/u/jacobusmmsmit)\
**Replies:** 1\
**Last updated:** [January 7, 2022, 6:58am UTC](https://discourse.julialang.org/t/turing-with-ode-model-using-dualcache-causes-error/74166 "2022-01-07T06:58:02Z")

</div>

I am running into a similar problem as this thread which unfortunately didn’t resolve the issue in my case. I think I am perhaps misusing dualcache in the definition of my update function and I would be grateful for any …

---

## [Python-Julia cheat sheet?](https://discourse.julialang.org/t/python-julia-cheat-sheet/65673)

<div class="topic-metadata">

**Author:** [@feline](https://discourse.julialang.org/u/feline)\
**Replies:** 14\
**Last updated:** [January 7, 2022, 6:27am UTC](https://discourse.julialang.org/t/python-julia-cheat-sheet/65673 "2022-01-07T06:27:16Z")

</div>

I am new to Julia but well-versed in Python, and was wondering if there is a Python to Julia mapping chart (similar in concept to this SQL to MongoDB mapping chart: SQL to MongoDB Mapping Chart - Database Manual - MongoD…

---

## [Improving performance on nested for loops (SparseArrays, LibGEOS)](https://discourse.julialang.org/t/improving-performance-on-nested-for-loops-sparsearrays-libgeos/74038)

<div class="topic-metadata">

**Author:** [@nbalasus](https://discourse.julialang.org/u/nbalasus)\
**Replies:** 10\
**Last updated:** [January 7, 2022, 4:41am UTC](https://discourse.julialang.org/t/improving-performance-on-nested-for-loops-sparsearrays-libgeos/74038 "2022-01-07T04:41:15Z")

</div>

I have two arrays of polygons, one with 9,000,000 polygons and the other with 60,000 polygons. I would like to find the intersecting area of each of these. In the MWE example below where I have reduced the example to 201…

---

## [Alternative way to create following array raised to powers?](https://discourse.julialang.org/t/alternative-way-to-create-following-array-raised-to-powers/74154)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 9\
**Last updated:** [January 7, 2022, 4:15am UTC](https://discourse.julialang.org/t/alternative-way-to-create-following-array-raised-to-powers/74154 "2022-01-07T04:15:40Z")

</div>

How to do following more efficiently (any alternative way ?) julia\> a = \[-1,0,1\] # my array 3-element Vector{Int64}: -1 0 1 julia\> hcat(\[a.^i for i in 0:3\]...)' # array raised to power 0:n and then transposed …

---

## [How to create and fill a vector of Struct as in a Matrix?](https://discourse.julialang.org/t/how-to-create-and-fill-a-vector-of-struct-as-in-a-matrix/74156)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 12\
**Last updated:** [January 6, 2022, 10:24pm UTC](https://discourse.julialang.org/t/how-to-create-and-fill-a-vector-of-struct-as-in-a-matrix/74156 "2022-01-06T22:24:47Z")

</div>

I have a struct of Rs and a vector R of it. Currently, I am using such the below code to construct R and then change the values of its fields. Base.@kwdef mutable struct Rs I::Vector{Float64} = \[2,2,2\] Dot::Arra…

---

## [Error plotting array with exponential operation](https://discourse.julialang.org/t/error-plotting-array-with-exponential-operation/74171)

<div class="topic-metadata">

**Author:** [@CentraCep](https://discourse.julialang.org/u/CentraCep)\
**Replies:** 1\
**Last updated:** [January 7, 2022, 1:11am UTC](https://discourse.julialang.org/t/error-plotting-array-with-exponential-operation/74171 "2022-01-07T01:11:59Z")

</div>

I am new to Julia and I am trying to create a plot with the following: xi2 = range(0,sqrt(6),step=1e-3) collect(xi2) plot(xi2, 1-xi2^2/6, label="n = 0") When I try this though, I have the error: MethodErro…

---

## [Rowwise function call](https://discourse.julialang.org/t/rowwise-function-call/74161)

<div class="topic-metadata">

**Author:** [@Alireza\_Moradzadeh](https://discourse.julialang.org/u/Alireza_Moradzadeh)\
**Replies:** 1\
**Last updated:** [January 7, 2022, 12:27am UTC](https://discourse.julialang.org/t/rowwise-function-call/74161 "2022-01-07T00:27:12Z")

</div>

Hi, I am new to Julia and my terminology should be tribble. I am working with DifferentialEquations.jl, I am trying to calculate histograms of solutions at each point, basically, I have an array of solutions. arrsol siz…

---

## [How to imporove descriptions of videos on Julia Youtube channel?](https://discourse.julialang.org/t/how-to-imporove-descriptions-of-videos-on-julia-youtube-channel/74169)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 0\
**Last updated:** [January 6, 2022, 11:53pm UTC](https://discourse.julialang.org/t/how-to-imporove-descriptions-of-videos-on-julia-youtube-channel/74169 "2022-01-06T23:53:15Z")

</div>

Recently I opened discussion about mistakes in descriptions on videos on Julia YT channel, so I need to justify why I open another topic. Previous discussion is about clear mistakes that arise from many reasons, while th…

---

## [NLParameter](https://discourse.julialang.org/t/nlparameter/74163)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 2\
**Last updated:** [January 6, 2022, 11:12pm UTC](https://discourse.julialang.org/t/nlparameter/74163 "2022-01-06T23:12:17Z")

</div>

Is there any way to register an NLParameter as part of a Model? For example, I would like to create a model model = Model(Ipopt.Optimizer) @variable(model, x) @NLParameter(model, p == 0) @NLobjective(model, Min, (x + p)…

---

## [Even more clarification on Type piracy](https://discourse.julialang.org/t/even-more-clarification-on-type-piracy/9079)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 24\
**Last updated:** [January 6, 2022, 10:47pm UTC](https://discourse.julialang.org/t/even-more-clarification-on-type-piracy/9079 "2022-01-06T22:47:32Z")

</div>

There was a post already about clarifying type piracy. There is also something on the Julia docs, but I would say it is quite small. So it is best to ask for more. I have 2 use cases, in which use DifferentialEquations …

---

## [Global optimization using \`IntervalArithmetic.jl\` and \`ForwardDiff.jl\` on the GPU with \`CUDA.jl\`](https://discourse.julialang.org/t/global-optimization-using-intervalarithmetic-jl-and-forwarddiff-jl-on-the-gpu-with-cuda-jl/73975)

<div class="topic-metadata">

**Author:** [@lmg](https://discourse.julialang.org/u/lmg)\
**Replies:** 7\
**Last updated:** [January 6, 2022, 10:22pm UTC](https://discourse.julialang.org/t/global-optimization-using-intervalarithmetic-jl-and-forwarddiff-jl-on-the-gpu-with-cuda-jl/73975 "2022-01-06T22:22:14Z")

</div>

I’m trying to solve a global optimization problem concerning the parameters of the “Two Compartment Model”. Given an initial parameter search space that’s split into smaller boxes of a predefined maximum width, I’m inter…

---

## [Convert from abstract type to julia-type with cost](https://discourse.julialang.org/t/convert-from-abstract-type-to-julia-type-with-cost/73927)

<div class="topic-metadata">

**Author:** [@qiu\_lin](https://discourse.julialang.org/u/qiu_lin)\
**Replies:** 2\
**Last updated:** [January 6, 2022, 9:03pm UTC](https://discourse.julialang.org/t/convert-from-abstract-type-to-julia-type-with-cost/73927 "2022-01-06T21:03:24Z")

</div>

I need to use hypergeometric function define on the whole complex-plane. And I find that Arblib.jl and Nemo.jl fit for me but the problem is that they use abitary types both and thus whatever math manipulation put on the…

---

## [MessyTimeSeries.jl and MessyTimeSeriesOptim.jl](https://discourse.julialang.org/t/messytimeseries-jl-and-messytimeseriesoptim-jl/72546)

<div class="topic-metadata">

**Author:** [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Replies:** 1\
**Last updated:** [January 6, 2022, 8:58pm UTC](https://discourse.julialang.org/t/messytimeseries-jl-and-messytimeseriesoptim-jl/72546 "2022-01-06T20:58:08Z")

</div>

Hi there, I have some major news for those who are interested in time series analysis: I have renamed TSAnalysis.jl to MessyTimeSeries.jl (link) and released a new package called MessyTimeSeriesOptim.jl (link) The rena…

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

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