# Latest

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

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

**Page:** 1546

---

## [KernelDensity.jl vs scipy.stats' gaussian\_kde](https://discourse.julialang.org/t/kerneldensity-jl-vs-scipy-stats-gaussian-kde/51917)

<div class="topic-metadata">

**Author:** [@danielalfonsetti](https://discourse.julialang.org/u/danielalfonsetti)\
**Replies:** 2\
**Last updated:** [December 16, 2020, 2:15pm UTC](https://discourse.julialang.org/t/kerneldensity-jl-vs-scipy-stats-gaussian-kde/51917 "2020-12-16T14:15:31Z")

</div>

I’m trying to convert some python code to julia code, but there appears to be a discrepancy between the python KDE and the julia KDE. Here is a reproducible example, similar to what is happening in my project: Python: f…

---

## [Interval times Int64 and Interval times BigInt discrepancy](https://discourse.julialang.org/t/interval-times-int64-and-interval-times-bigint-discrepancy/51902)

<div class="topic-metadata">

**Author:** [@gmouts](https://discourse.julialang.org/u/gmouts)\
**Replies:** 7\
**Last updated:** [December 16, 2020, 1:47pm UTC](https://discourse.julialang.org/t/interval-times-int64-and-interval-times-bigint-discrepancy/51902 "2020-12-16T13:47:22Z")

</div>

I want to get the positive root of some polynomials with ridiculous precision. The polynomials I care I about are of the form \\sum\_{k=0}^{n-1} a\_k x^k - x^n, with a\_k's being natural numbers. I am trying to write a progr…

---

## [What's the differences between \`throw(ArgumentError(""))\` and \`return throw(ArgumentError("")\`)](https://discourse.julialang.org/t/whats-the-differences-between-throw-argumenterror-and-return-throw-argumenterror/51909)

<div class="topic-metadata">

**Author:** [@baddate](https://discourse.julialang.org/u/baddate)\
**Replies:** 1\
**Last updated:** [December 16, 2020, 11:23am UTC](https://discourse.julialang.org/t/whats-the-differences-between-throw-argumenterror-and-return-throw-argumenterror/51909 "2020-12-16T11:23:05Z")

</div>

i wrote a function that will throw an ArgumentError if it occurred any exception. but i have a question about throwing an error: i can use throw() directly, also i can use the return keyword. Is there any difference? …

---

## [Compose GraphPlot LightGraphs Position](https://discourse.julialang.org/t/compose-graphplot-lightgraphs-position/33177)

<div class="topic-metadata">

**Author:** [@Simplex](https://discourse.julialang.org/u/Simplex)\
**Replies:** 8\
**Last updated:** [December 16, 2020, 10:41am UTC](https://discourse.julialang.org/t/compose-graphplot-lightgraphs-position/33177 "2020-12-16T10:41:50Z")

</div>

I do a project about infection spreading. I want to have my network immovable but I don’t find a solution. I also tried to have no superposition but I find nothing Thanks a lot for your help ! My code won’t work with …

---

## [Easiest way to do "replace col1 = col2 if col3" in a dataframe](https://discourse.julialang.org/t/easiest-way-to-do-replace-col1-col2-if-col3-in-a-dataframe/51891)

<div class="topic-metadata">

**Author:** [@RangeFu](https://discourse.julialang.org/u/RangeFu)\
**Replies:** 3\
**Last updated:** [December 16, 2020, 10:23am UTC](https://discourse.julialang.org/t/easiest-way-to-do-replace-col1-col2-if-col3-in-a-dataframe/51891 "2020-12-16T10:23:54Z")

</div>

A very common operation in data manipulation: Update in-place col1 from col2 but only for rows where conditions hold for col3. If we stick to DataFrames, it has to be: dt\[dt.c, a\] = dt\[dt.c, b\] so we have to carry dt. …

---

## [How to avoid supplying exact types in a Dict constructor?](https://discourse.julialang.org/t/how-to-avoid-supplying-exact-types-in-a-dict-constructor/51510)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 12\
**Last updated:** [December 16, 2020, 10:11am UTC](https://discourse.julialang.org/t/how-to-avoid-supplying-exact-types-in-a-dict-constructor/51510 "2020-12-16T10:11:00Z")

</div>

Hi, When I have a type hierarchy where TC is a concrete implementation of type T and I have defined a struct as follows: struct Foo d::Dict{T,Any} end What do I need to do to be able to call the constructor as fol…

---

## [Implementing/Simulating 5 staged MIPS processor in Julia](https://discourse.julialang.org/t/implementing-simulating-5-staged-mips-processor-in-julia/51918)

<div class="topic-metadata">

**Author:** [@Ashwani\_Rathee](https://discourse.julialang.org/u/Ashwani_Rathee)\
**Replies:** 0\
**Last updated:** [December 16, 2020, 7:56am UTC](https://discourse.julialang.org/t/implementing-simulating-5-staged-mips-processor-in-julia/51918 "2020-12-16T07:56:52Z")

</div>

Hey all,I wanted to ask if it’s possible to implement/simulate MIPS processior in julia I am currently trying to find a final project for my first course in computer architecture.I have ample amount of time and I want t…

---

## [DrWatson.jl: How to put a float 1e15 in the name? and how to save txt files?](https://discourse.julialang.org/t/drwatson-jl-how-to-put-a-float-1e15-in-the-name-and-how-to-save-txt-files/49875)

<div class="topic-metadata">

**Author:** [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Replies:** 2\
**Last updated:** [December 16, 2020, 9:11am UTC](https://discourse.julialang.org/t/drwatson-jl-how-to-put-a-float-1e15-in-the-name-and-how-to-save-txt-files/49875 "2020-12-16T09:11:01Z")

</div>

Hello everyone? As the title says, it’s a DrWatson.jl related question. Actually, I have 2 questions Question 1 Let’s say I have julia\> using DrWatson julia\> params = Dict(:a=\>1e15, :b=\>1:23) Dict{Symbol,Any} with 2 …

---

## [Weights from neural network as interaction score between pairs](https://discourse.julialang.org/t/weights-from-neural-network-as-interaction-score-between-pairs/51921)

<div class="topic-metadata">

**Author:** [@alperyilmaz](https://discourse.julialang.org/u/alperyilmaz)\
**Replies:** 0\
**Last updated:** [December 16, 2020, 9:05am UTC](https://discourse.julialang.org/t/weights-from-neural-network-as-interaction-score-between-pairs/51921 "2020-12-16T09:05:52Z")

</div>

The question is using genes as example but I thought “Machine Learning” section is more suitable for this question. Because the concept is independent from genes, might be applicable to other domains. Suppose we have ma…

---

## [Help to plot in Julia](https://discourse.julialang.org/t/help-to-plot-in-julia/51910)

<div class="topic-metadata">

**Author:** [@Enrique](https://discourse.julialang.org/u/Enrique)\
**Replies:** 6\
**Last updated:** [December 16, 2020, 8:47am UTC](https://discourse.julialang.org/t/help-to-plot-in-julia/51910 "2020-12-16T08:47:58Z")

</div>

I love Julia, but I still do not figure out how to make pretty plots. The figure size is in pixels rather than inches, which complicates things when you want to set font sizes (in points). LaTeXStrings does not work in W…

---

## [Should reinterpret return the parent array if the eltype is unchanged?](https://discourse.julialang.org/t/should-reinterpret-return-the-parent-array-if-the-eltype-is-unchanged/51920)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [December 16, 2020, 8:44am UTC](https://discourse.julialang.org/t/should-reinterpret-return-the-parent-array-if-the-eltype-is-unchanged/51920 "2020-12-16T08:44:47Z")

</div>

For example: julia\> a = \[1 + im, 2 + 2im\] 2-element Array{Complex{Int64},1}: 1 + 1im 2 + 2im julia\> reinterpret(eltype(a), a) 2-element reinterpret(Complex{Int64}, ::Array{Complex{Int64},1}): 1 + 1im 2 + 2im Do we…

---

## [3d plot plotly vs plotlyjs](https://discourse.julialang.org/t/3d-plot-plotly-vs-plotlyjs/51907)

<div class="topic-metadata">

**Author:** [@espin](https://discourse.julialang.org/u/espin)\
**Replies:** 1\
**Last updated:** [December 16, 2020, 6:17am UTC](https://discourse.julialang.org/t/3d-plot-plotly-vs-plotlyjs/51907 "2020-12-16T06:17:08Z")

</div>

So I have a 2 dimensional array I want to plot as a 3d surface in plotlyjs, the problem is that is not working on plotlyjs even though it works ok on plotly. Here is an example: using Plots plotly() A=reshape(repeat(si…

---

## [Find Taylor Series of a Function](https://discourse.julialang.org/t/find-taylor-series-of-a-function/51847)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 11\
**Last updated:** [December 16, 2020, 3:52am UTC](https://discourse.julialang.org/t/find-taylor-series-of-a-function/51847 "2020-12-16T03:52:52Z")

</div>

I’m completely at a loss for finding the Taylor Series of a function using TaylorSeries.jl using TaylorSeries using QuadGK f(x)=cos(x) t=Taylor1(f(pi/2),2) quadgk(x-\>cos(t), 22pi/45,pi/2;order=2)

---

## [Not accepting "%f" in ccall(:sscanf, args...)?](https://discourse.julialang.org/t/not-accepting-f-in-ccall-sscanf-args/51854)

<div class="topic-metadata">

**Author:** [@Ibb](https://discourse.julialang.org/u/Ibb)\
**Replies:** 2\
**Last updated:** [December 16, 2020, 1:58am UTC](https://discourse.julialang.org/t/not-accepting-f-in-ccall-sscanf-args/51854 "2020-12-16T01:58:35Z")

</div>

Test on Windows 10 19042.662, Julia version 1.5.3 (2020-11-09). Code below works. u,v,w= Ref{Int32}(0),Ref{Int32}(0),Ref{Int32}(0) ccall(:sscanf, Int, (Ptr{UInt8}, Ptr{UInt8}, Ref{Int32}, Ref{Int32}, Ref{Int32}), "1 2 …

---

## [High precision interval rounding error](https://discourse.julialang.org/t/high-precision-interval-rounding-error/51885)

<div class="topic-metadata">

**Author:** [@gmouts](https://discourse.julialang.org/u/gmouts)\
**Replies:** 6\
**Last updated:** [December 15, 2020, 11:46pm UTC](https://discourse.julialang.org/t/high-precision-interval-rounding-error/51885 "2020-12-15T23:46:34Z")

</div>

Before everything I need a disclaimer: I do understand that the precision which I set is comically large. However, there is a legitimate reason for what I am doing, but I’m not going to go into it. The following snippet…

---

## [Array with constant values](https://discourse.julialang.org/t/array-with-constant-values/51866)

<div class="topic-metadata">

**Author:** [@ishihama](https://discourse.julialang.org/u/ishihama)\
**Replies:** 7\
**Last updated:** [December 15, 2020, 10:28pm UTC](https://discourse.julialang.org/t/array-with-constant-values/51866 "2020-12-15T22:28:44Z")

</div>

I wish to create an array whose length is 102 and having constant values everywhere without defining a for-loop explicitly. Assuming such an array ArrayWithConst, if I define it like ArrayWithConst\[1:end\]=5.0, this gener…

---

## [Any (Computational) Neuroscientist Julia user here?](https://discourse.julialang.org/t/any-computational-neuroscientist-julia-user-here/1827)

<div class="topic-metadata">

**Author:** [@mgiugliano](https://discourse.julialang.org/u/mgiugliano)\
**Replies:** 30\
**Last updated:** [December 15, 2020, 10:04pm UTC](https://discourse.julialang.org/t/any-computational-neuroscientist-julia-user-here/1827 "2020-12-15T22:04:12Z")

</div>

I am the local organiser of this year annual conference of the Organisation for Computational Neuroscience - CNS2017 (CNS 2017) to be held in July 2017 in Antwerpen (Belgium). We expect ~700 participants from all around …

---

## [REPL help mode discoverability](https://discourse.julialang.org/t/repl-help-mode-discoverability/51676)

<div class="topic-metadata">

**Author:** [@devel-chm](https://discourse.julialang.org/u/devel-chm)\
**Replies:** 11\
**Last updated:** [December 15, 2020, 9:54pm UTC](https://discourse.julialang.org/t/repl-help-mode-discoverability/51676 "2020-12-15T21:54:00Z")

</div>

As a relative newcomer to Julia, I have been making increasing use of the REPL and other versions of tooling to understand and select a workflow for julia use. One problem I have is the ability to discover needed functi…

---

## [Dimension mismatch. "Cannot sum matrices" when doing a product](https://discourse.julialang.org/t/dimension-mismatch-cannot-sum-matrices-when-doing-a-product/51869)

<div class="topic-metadata">

**Author:** [@prit](https://discourse.julialang.org/u/prit)\
**Replies:** 1\
**Last updated:** [December 15, 2020, 9:17pm UTC](https://discourse.julialang.org/t/dimension-mismatch-cannot-sum-matrices-when-doing-a-product/51869 "2020-12-15T21:17:36Z")

</div>

I have the following code: using JuMP using MosekTools K = 3 N = 2 penalties = \[1.0, 3.9, 8.7\] function fac1(r::Number, i::Number, l::Number) fac1 = 1.0 for m in 0:r-1 fac1 \*= (i-m)\*(l-m) end ret…

---

## [Use "end" as NamedTuple key or struct field](https://discourse.julialang.org/t/use-end-as-namedtuple-key-or-struct-field/51862)

<div class="topic-metadata">

**Author:** [@marlin](https://discourse.julialang.org/u/marlin)\
**Replies:** 5\
**Last updated:** [December 15, 2020, 7:38pm UTC](https://discourse.julialang.org/t/use-end-as-namedtuple-key-or-struct-field/51862 "2020-12-15T19:38:48Z")

</div>

I wanted to use “end” as a key of NamedTuple, however: julia\> (start = 1, end = 2) ERROR: syntax: unexpected "end" While I understand “end” is a reserved keyword, I guess there is no ambiguity if it is inside parenthes…

---

## [Get function as expr](https://discourse.julialang.org/t/get-function-as-expr/51886)

<div class="topic-metadata">

**Author:** [@Volker\_Weissmann](https://discourse.julialang.org/u/Volker_Weissmann)\
**Replies:** 5\
**Last updated:** [December 15, 2020, 6:22pm UTC](https://discourse.julialang.org/t/get-function-as-expr/51886 "2020-12-15T18:22:07Z")

</div>

My question is the same as Is there a way to get the expression object for a function? , but the old answer does not work in new julia versions. Lets say you defined method: function func() return 17 end I know th…

---

## [Expand row to multiple rows](https://discourse.julialang.org/t/expand-row-to-multiple-rows/51872)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 11\
**Last updated:** [December 15, 2020, 5:50pm UTC](https://discourse.julialang.org/t/expand-row-to-multiple-rows/51872 "2020-12-15T17:50:44Z")

</div>

I have this data: df=DataFrame(name=\["aaa","bbbb","ccc"\], frqty=\["apple\\\\4\\\\melon\\\\5","plume\\\\12","graphes\\\\7\\\\mango\\\\9\\\\persic\\\\11"\]) the goal is to get a group of rows for each name and two …

---

## [Unsatisfiable requirement for CUDAnative](https://discourse.julialang.org/t/unsatisfiable-requirement-for-cudanative/51878)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 5\
**Last updated:** [December 15, 2020, 5:44pm UTC](https://discourse.julialang.org/t/unsatisfiable-requirement-for-cudanative/51878 "2020-12-15T17:44:10Z")

</div>

I am getting this error when installing CUDAnative. Any idea on how to solve these dependencies? (@v1.5) pkg\> add CUDAnative Updating registry at \`~/.julia/registries/General\` ########################################…

---

## [Promote operation; report this](https://discourse.julialang.org/t/promote-operation-report-this/51871)

<div class="topic-metadata">

**Author:** [@prit](https://discourse.julialang.org/u/prit)\
**Replies:** 1\
**Last updated:** [December 15, 2020, 3:35pm UTC](https://discourse.julialang.org/t/promote-operation-report-this/51871 "2020-12-15T15:35:29Z")

</div>

I have the following code in which a constraint is giving a “promote operation error”: using JuMP using MosekTools K = 3 N = 2 penalties = \[1.0, 3.9, 8.7\] function fac1(r::Number, i::Number, l::Number) fac1 = 1.0 …

---

## [Could you please produce a New toml for TextAnalysis - its downgrading DataFrames version](https://discourse.julialang.org/t/could-you-please-produce-a-new-toml-for-textanalysis-its-downgrading-dataframes-version/51819)

<div class="topic-metadata">

**Author:** [@lulamprea](https://discourse.julialang.org/u/lulamprea)\
**Replies:** 6\
**Last updated:** [December 15, 2020, 3:35pm UTC](https://discourse.julialang.org/t/could-you-please-produce-a-new-toml-for-textanalysis-its-downgrading-dataframes-version/51819 "2020-12-15T15:35:03Z")

</div>

When Adding TextAnalysis package it downgrades DataFrames to 0.21.8. I need to user 0.22 version. Could you please update TextAnalysis to suppots Dataframes 0.22+? Thansks,

---

## [Rationale & operations for built-in \`HTML\` type](https://discourse.julialang.org/t/rationale-operations-for-built-in-html-type/50585)

<div class="topic-metadata">

**Author:** [@cce](https://discourse.julialang.org/u/cce)\
**Replies:** 12\
**Last updated:** [December 15, 2020, 2:39pm UTC](https://discourse.julialang.org/t/rationale-operations-for-built-in-html-type/50585 "2020-12-15T14:39:31Z")

</div>

I’m curious about the scope of the built-in HTML type. It’s nice that something like this exists, to indicate that a given string value is intended to be valid HTML. However, it doesn’t seem that general operations on …

---

## [Prevent overriding an array](https://discourse.julialang.org/t/prevent-overriding-an-array/51875)

<div class="topic-metadata">

**Author:** [@Sleepy](https://discourse.julialang.org/u/Sleepy)\
**Replies:** 2\
**Last updated:** [December 15, 2020, 2:38pm UTC](https://discourse.julialang.org/t/prevent-overriding-an-array/51875 "2020-12-15T14:38:33Z")

</div>

Hi, if I perform the following code function next\_step(x, i) x\[i\] = x\[i\]+1 return x end x = \[0,0,0,0\] x\_a = next\_step(x, 1) the value of x is \[1,0,0,0\]. The value should be still \[0,0,0,0\]. Why do the value …

---

## [How to replace consume and produce with channels](https://discourse.julialang.org/t/how-to-replace-consume-and-produce-with-channels/5125)

<div class="topic-metadata">

**Author:** [@scidom](https://discourse.julialang.org/u/scidom)\
**Replies:** 14\
**Last updated:** [December 15, 2020, 1:12pm UTC](https://discourse.julialang.org/t/how-to-replace-consume-and-produce-with-channels/5125 "2020-12-15T13:12:56Z")

</div>

I got a deprecation warning while trying to upgrade to Julia v0.6, saying that the consume() and produce() functions are not available anymore, and that I should use channels. The usage of channels is not clear to me ye…

---

## [Using incompletely initialized structs instead of fields of type Union{Nothing,T}](https://discourse.julialang.org/t/using-incompletely-initialized-structs-instead-of-fields-of-type-union-nothing-t/51831)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 8\
**Last updated:** [December 15, 2020, 12:20pm UTC](https://discourse.julialang.org/t/using-incompletely-initialized-structs-instead-of-fields-of-type-union-nothing-t/51831 "2020-12-15T12:20:19Z")

</div>

Suppose I want to define a custom type that I initialize gradually one field at a time. I could do something like this: mutable struct A x::Union{Nothing, Int} y::Union{Nothing, Bool} z::Union{Nothing, Strin…

---

## [Interpolating in a heatmap using Gnuplot.jl](https://discourse.julialang.org/t/interpolating-in-a-heatmap-using-gnuplot-jl/51683)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 6\
**Last updated:** [December 15, 2020, 12:20pm UTC](https://discourse.julialang.org/t/interpolating-in-a-heatmap-using-gnuplot-jl/51683 "2020-12-15T12:20:18Z")

</div>

I have a matrix with dimensions 26 x 25 and am using gnuplot to create a heatmap. This is relatively simple by running @gp :- comb "w image pixels". However, I have two questions Is it possible to interpolate data so…

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

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