# Specific Domains

**URL:** https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=550

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

**Page:** 551

---

## [Scientic rounding functions?](https://discourse.julialang.org/t/scientic-rounding-functions/6766)

<div class="topic-metadata">

**Author:** [@John\_Hearns](https://discourse.julialang.org/u/John_Hearns)\
**Replies:** 4\
**Last updated:** [October 30, 2017, 1:17pm UTC](https://discourse.julialang.org/t/scientic-rounding-functions/6766 "2017-10-30T13:17:00Z")

</div>

Is there an equivalent of Perl Math::Round package in Julia? Math::Round - Perl extension for rounding numbers - metacpan.org I have found this very useful in the past, the package properly rounds off floating point nu…

---

## [Interpolation with given values and gradients](https://discourse.julialang.org/t/interpolation-with-given-values-and-gradients/6654)

<div class="topic-metadata">

**Author:** [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Replies:** 10\
**Last updated:** [October 30, 2017, 10:12am UTC](https://discourse.julialang.org/t/interpolation-with-given-values-and-gradients/6654 "2017-10-30T10:12:58Z")

</div>

I need to build an interpolation on a function that is known on a grid. Interpolations.jl seems like the perfect package for this. I have two questions, however: 1- I know both the value of the function and its gradient…

---

## [How to replace the current plot in the same browser tab?](https://discourse.julialang.org/t/how-to-replace-the-current-plot-in-the-same-browser-tab/6757)

<div class="topic-metadata">

**Author:** [@turtle](https://discourse.julialang.org/u/turtle)\
**Replies:** 2\
**Last updated:** [October 30, 2017, 9:02am UTC](https://discourse.julialang.org/t/how-to-replace-the-current-plot-in-the-same-browser-tab/6757 "2017-10-30T09:02:17Z")

</div>

With Plots + Plotly each new plot is created in a new browser tab. Is it possible to replace the current plot in the same tab?

---

## [How to get @NLparameter in a model?](https://discourse.julialang.org/t/how-to-get-nlparameter-in-a-model/6750)

<div class="topic-metadata">

**Author:** [@CanLi1](https://discourse.julialang.org/u/CanLi1)\
**Replies:** 3\
**Last updated:** [October 30, 2017, 2:38am UTC](https://discourse.julialang.org/t/how-to-get-nlparameter-in-a-model/6750 "2017-10-30T02:38:54Z")

</div>

For variables and constraints, we can use the function getindex(m, :x) to get the variable or constraints. But for @NLparameter defined in a model, getindex doesn’t work for me. Does anyone know how to get the NLparamet…

---

## [Using julia vector in R without copying with RCall](https://discourse.julialang.org/t/using-julia-vector-in-r-without-copying-with-rcall/6590)

<div class="topic-metadata">

**Author:** [@vipstar](https://discourse.julialang.org/u/vipstar)\
**Replies:** 2\
**Last updated:** [October 29, 2017, 10:57pm UTC](https://discourse.julialang.org/t/using-julia-vector-in-r-without-copying-with-rcall/6590 "2017-10-29T22:57:04Z")

</div>

Hi, I can move an array from R to julia without copying the array (with reval) but I was wondering if there is a way to move a julia vector to R without copying the array using RCall. I want to move the vector into a da…

---

## [Callback function for Fminbox](https://discourse.julialang.org/t/callback-function-for-fminbox/6743)

<div class="topic-metadata">

**Author:** [@depasquale](https://discourse.julialang.org/u/depasquale)\
**Replies:** 0\
**Last updated:** [October 28, 2017, 3:47pm UTC](https://discourse.julialang.org/t/callback-function-for-fminbox/6743 "2017-10-28T15:47:20Z")

</div>

I am trying to perform a constrained optimization using fminbox in the optim.jl package and would like to execute a callback function within the inner loop AND the outer loop to terminate the optimization if too much tim…

---

## [\[ANN\] New version of AstroLib.jl](https://discourse.julialang.org/t/ann-new-version-of-astrolib-jl/6729)

<div class="topic-metadata">

**Author:** [@giordano](https://discourse.julialang.org/u/giordano)\
**Replies:** 2\
**Last updated:** [October 28, 2017, 4:47pm UTC](https://discourse.julialang.org/t/ann-new-version-of-astrolib-jl/6729 "2017-10-28T16:47:13Z")

</div>

Version v0.2.0 of AstroLib.jl has been tagged. This is the first release featuring the work made by Kumar Prasun (@TestSubjector) during last Google Summer of Code, under the umbrella of OpenAstronomy. Kumar ported sev…

---

## [How to access the localpart of a distributed array?](https://discourse.julialang.org/t/how-to-access-the-localpart-of-a-distributed-array/6711)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 8\
**Last updated:** [October 28, 2017, 5:37am UTC](https://discourse.julialang.org/t/how-to-access-the-localpart-of-a-distributed-array/6711 "2017-10-28T05:37:40Z")

</div>

I was trying to learn distributed array. And I can distribute the arrays using distribute, however I can’t work out how to get the localparts of arrays. As a MWE here what I am trying to do addprocs() @everywhere using…

---

## [NLopt simplex methods in log scale](https://discourse.julialang.org/t/nlopt-simplex-methods-in-log-scale/6452)

<div class="topic-metadata">

**Author:** [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Replies:** 5\
**Last updated:** [October 27, 2017, 8:24pm UTC](https://discourse.julialang.org/t/nlopt-simplex-methods-in-log-scale/6452 "2017-10-27T20:24:31Z")

</div>

Hi, It is often useful to move to log scale while searching for parameters in a wide range (1e-9, 1e9). In my case I am estimating parameters of ODE system in a range (1e-9, 1e9) using derivative-free optimization algor…

---

## [\[JuMP\] Build an empty constraint with arbitrary size](https://discourse.julialang.org/t/jump-build-an-empty-constraint-with-arbitrary-size/6725)

<div class="topic-metadata">

**Author:** [@brynpickering](https://discourse.julialang.org/u/brynpickering)\
**Replies:** 0\
**Last updated:** [October 27, 2017, 5:15pm UTC](https://discourse.julialang.org/t/jump-build-an-empty-constraint-with-arbitrary-size/6725 "2017-10-27T17:15:56Z")

</div>

I’m trying to build named constraints over arbitrary dimensions using @constraintref e.g. function build\_empty\_constraint(constraint\_dimensions) # e.g. constraint\_dimensions = \[1:2, 3:4\] @constraintref some\_con…

---

## [Bilinear Matrix Inequalities (BMIs)](https://discourse.julialang.org/t/bilinear-matrix-inequalities-bmis/6717)

<div class="topic-metadata">

**Author:** [@blegat](https://discourse.julialang.org/u/blegat)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 4:26pm UTC](https://discourse.julialang.org/t/bilinear-matrix-inequalities-bmis/6717 "2017-10-27T16:26:19Z")

</div>

With the new design of the interface used in JuliaOpt, it is now possible to formulate BMIs in JuMP. There exists several BMI solver in Matlab (e.g. BMIsolver) but I am not aware of any existing in Julia. I am currently …

---

## [Plots.jl styling vs. GR](https://discourse.julialang.org/t/plots-jl-styling-vs-gr/6676)

<div class="topic-metadata">

**Author:** [@Oliver\_Lylloff](https://discourse.julialang.org/u/Oliver_Lylloff)\
**Replies:** 2\
**Last updated:** [October 25, 2017, 11:50am UTC](https://discourse.julialang.org/t/plots-jl-styling-vs-gr/6676 "2017-10-25T11:50:58Z")

</div>

Hi there, I really enjoy Plots and GR (independently and as a backend for Plots). Thanks to the devs for putting all that love into it. Up until now I’ve used whatever suited my specific plotting needs but I’m starting…

---

## [Should there be an inverse stft in DSP.jl?](https://discourse.julialang.org/t/should-there-be-an-inverse-stft-in-dsp-jl/6661)

<div class="topic-metadata">

**Author:** [@standarddeviant](https://discourse.julialang.org/u/standarddeviant)\
**Replies:** 1\
**Last updated:** [October 24, 2017, 6:39pm UTC](https://discourse.julialang.org/t/should-there-be-an-inverse-stft-in-dsp-jl/6661 "2017-10-24T18:39:22Z")

</div>

I’ve seen a few implementations in matlab, but this describes things the stft / istft procedure at a higher-level: I’m interested in this and am wondering if other people would be interested in this.

---

## [Generating random group matrices](https://discourse.julialang.org/t/generating-random-group-matrices/6634)

<div class="topic-metadata">

**Author:** [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Replies:** 6\
**Last updated:** [October 24, 2017, 2:00pm UTC](https://discourse.julialang.org/t/generating-random-group-matrices/6634 "2017-10-24T14:00:15Z")

</div>

I was wondering if there was already a package out there for generating random matrices from SU(N) and SO(N). This mostly boils down to generating random points on n-spheres and is not difficult to implement for particu…

---

## [Will cassette.jl (new backend for ReverseDiff.jl) obviate need for ML framework?](https://discourse.julialang.org/t/will-cassette-jl-new-backend-for-reversediff-jl-obviate-need-for-ml-framework/6514)

<div class="topic-metadata">

**Author:** [@outlace](https://discourse.julialang.org/u/outlace)\
**Replies:** 3\
**Last updated:** [October 19, 2017, 12:39pm UTC](https://discourse.julialang.org/t/will-cassette-jl-new-backend-for-reversediff-jl-obviate-need-for-ml-framework/6514 "2017-10-19T12:39:49Z")

</div>

I saw the JuliaCon2017 talk by Jarrett Revels about ReverseDiff.jl and how he’s working on cassette.jl to overhaul the backend for ReverseDiff.jl, which should address most (or all) of it’s current limitations. If casse…

---

## [Mean Variance Optimal Portfolio](https://discourse.julialang.org/t/mean-variance-optimal-portfolio/6607)

<div class="topic-metadata">

**Author:** [@adwelch](https://discourse.julialang.org/u/adwelch)\
**Replies:** 6\
**Last updated:** [October 23, 2017, 1:23am UTC](https://discourse.julialang.org/t/mean-variance-optimal-portfolio/6607 "2017-10-23T01:23:48Z")

</div>

Hello, I have n risky assets and no risk free asset and risk aversion parameter is 4(gamma). I want to use mean-variance criteria to compute optimal portfolio weights. From historical data, I have expected return data or…

---

## [Distributed Conjugate Gradient Numerical Errors](https://discourse.julialang.org/t/distributed-conjugate-gradient-numerical-errors/6602)

<div class="topic-metadata">

**Author:** [@klowrey](https://discourse.julialang.org/u/klowrey)\
**Replies:** 9\
**Last updated:** [October 22, 2017, 9:03pm UTC](https://discourse.julialang.org/t/distributed-conjugate-gradient-numerical-errors/6602 "2017-10-22T21:03:46Z")

</div>

Hi All, I was implementing a distributed conjugate gradient method in the course of my research and have run into a numerical issue when distributing the code to multiple processes. Algorithmically, my single process an…

---

## [NaN from multinomial distribution at p=1](https://discourse.julialang.org/t/nan-from-multinomial-distribution-at-p-1/6573)

<div class="topic-metadata">

**Author:** [@improbable22](https://discourse.julialang.org/u/improbable22)\
**Replies:** 4\
**Last updated:** [October 21, 2017, 10:13pm UTC](https://discourse.julialang.org/t/nan-from-multinomial-distribution-at-p-1/6573 "2017-10-21T22:13:22Z")

</div>

I’m getting NaN from a multinomial distribution, where I expected 1. Is this a bug or am I doing something wrong? using Distributions dist = Multinomial(2, \[0.999,0.001\]) pdf(dist,\[2,0\]) ## 0.998, ok dist = Multinomi…

---

## [Building a solver (Getting variable types)](https://discourse.julialang.org/t/building-a-solver-getting-variable-types/6587)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 7\
**Last updated:** [October 21, 2017, 12:18am UTC](https://discourse.julialang.org/t/building-a-solver-getting-variable-types/6587 "2017-10-21T00:18:40Z")

</div>

I’m currently reading the documentation of MathProgBase from top to bottom and back again and having a look on some implementations of solvers. As far as I understood it: JuMP divides a problem into different categorie…

---

## [Converting Expr into constr](https://discourse.julialang.org/t/converting-expr-into-constr/6589)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 1\
**Last updated:** [October 20, 2017, 11:25pm UTC](https://discourse.julialang.org/t/converting-expr-into-constr/6589 "2017-10-20T23:25:26Z")

</div>

I would like to do something simple as that constr\_expr = MathProgBase.constr\_expr(m.d,i) JuMP.addconstraint(m.model, constr\_expr) Looks like this: JuMP.addNLconstraint(m, :($(x\[1\])\*$(x\[2\])\*$(x\[3\])\*$(x\[4\]) \>= 25)) wo…

---

## [HDF5 speed?](https://discourse.julialang.org/t/hdf5-speed/6584)

<div class="topic-metadata">

**Author:** [@tuckermcclure](https://discourse.julialang.org/u/tuckermcclure)\
**Replies:** 3\
**Last updated:** [October 20, 2017, 8:06pm UTC](https://discourse.julialang.org/t/hdf5-speed/6584 "2017-10-20T20:06:32Z")

</div>

I have a long-running simulation that logs to an HDF5 file on each sample. I preallocate space, and write, say, a vector to index 1 on the first sample, then to index 2 on the next sample, etc. I’m finding that logging d…

---

## [TensorFlow: Basic example fails on "Variable"](https://discourse.julialang.org/t/tensorflow-basic-example-fails-on-variable/6560)

<div class="topic-metadata">

**Author:** [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)\
**Replies:** 5\
**Last updated:** [October 20, 2017, 9:23am UTC](https://discourse.julialang.org/t/tensorflow-basic-example-fails-on-variable/6560 "2017-10-20T09:23:42Z")

</div>

When using the basic example from https://malmaud.github.io/tfdocs/basic\_usage/ the only way I can get it to complete without error is by suppressing the y “Variable”. This version works correctly (but the test fails): u…

---

## [Any possible reason a NLP model solving in GAMS and C++, doesn't in JuMP?](https://discourse.julialang.org/t/any-possible-reason-a-nlp-model-solving-in-gams-and-c-doesnt-in-jump/6410)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [October 20, 2017, 8:45am UTC](https://discourse.julialang.org/t/any-possible-reason-a-nlp-model-solving-in-gams-and-c-doesnt-in-jump/6410 "2017-10-20T08:45:36Z")

</div>

Hello, we have a rather complex non linear model (~5000 var, 1300 constraints) that solves in ~100 iterations in both GAMS (Conopt or IPOPT) and C++ (IPOPT/ADOL-C/Colpack stack) We are now converting it in JuMP, but, on…

---

## [Error running mamba](https://discourse.julialang.org/t/error-running-mamba/6530)

<div class="topic-metadata">

**Author:** [@Enzo\_Hernandez](https://discourse.julialang.org/u/Enzo_Hernandez)\
**Replies:** 1\
**Last updated:** [October 19, 2017, 8:31am UTC](https://discourse.julialang.org/t/error-running-mamba/6530 "2017-10-19T08:31:56Z")

</div>

hey guys i’m getting this error while running my model in mamba: ‘LoadError: ArgumentError: matrix is not symmetric/Hermitian. This error can be avoided by calling cholfact(Hermitian(A)) which will ignore either the upp…

---

## [Cplex parameters for Benders Algorithm could not be reconized in JuMP](https://discourse.julialang.org/t/cplex-parameters-for-benders-algorithm-could-not-be-reconized-in-jump/6487)

<div class="topic-metadata">

**Author:** [@Wei\_Wang](https://discourse.julialang.org/u/Wei_Wang)\
**Replies:** 8\
**Last updated:** [October 18, 2017, 11:51pm UTC](https://discourse.julialang.org/t/cplex-parameters-for-benders-algorithm-could-not-be-reconized-in-jump/6487 "2017-10-18T23:51:58Z")

</div>

Hi, I am tryting to use the build in Benders Decomposition in Cplex to solve problems, but the parameter key words couldn’t be reconized. It seems JuMP can only reconize key words in their old names (the version before …

---

## [Updating data in JuMP constraints iteratively?](https://discourse.julialang.org/t/updating-data-in-jump-constraints-iteratively/5467)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 8\
**Last updated:** [October 18, 2017, 10:35pm UTC](https://discourse.julialang.org/t/updating-data-in-jump-constraints-iteratively/5467 "2017-10-18T22:35:44Z")

</div>

Suppose I have a data matrix A that is used in one of the constraints: using JuMP nx, ny = 150, 100 A = rand(nx, ny) m = Model() @variable(m, X\[1:nx,1:ny\]) @constraint(m, \[i=1:nx,j=1:ny\], X\[i,j\]-A\[i,j\] ≤ tol) # mor…

---

## [Best way to view an image or 2-D array in Atom/Juno?](https://discourse.julialang.org/t/best-way-to-view-an-image-or-2-d-array-in-atom-juno/6523)

<div class="topic-metadata">

**Author:** [@davidssmith](https://discourse.julialang.org/u/davidssmith)\
**Replies:** 4\
**Last updated:** [October 18, 2017, 5:47pm UTC](https://discourse.julialang.org/t/best-way-to-view-an-image-or-2-d-array-in-atom-juno/6523 "2017-10-18T17:47:18Z")

</div>

What is the most seamless way to view images in the Juno IDE with Atom? Typically my “images” are 2-D float arrays, not RGB. I usually use imshow from PyPlot, but that doesn’t seem to work inline with Atom. Thanks!

---

## [Function to re-orient mesh faces](https://discourse.julialang.org/t/function-to-re-orient-mesh-faces/6499)

<div class="topic-metadata">

**Author:** [@jaakkor2](https://discourse.julialang.org/u/jaakkor2)\
**Replies:** 4\
**Last updated:** [October 18, 2017, 2:51pm UTC](https://discourse.julialang.org/t/function-to-re-orient-mesh-faces/6499 "2017-10-18T14:51:12Z")

</div>

Tried to find Julia implementation of re-orienting faces of a mesh. Does an implementation exist? Geometries from external sources not necessary have their faces oriented consistently (even if possible). If visualized i…

---

## [How to define empty IndexedTables?](https://discourse.julialang.org/t/how-to-define-empty-indexedtables/6508)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 1\
**Last updated:** [October 18, 2017, 8:33am UTC](https://discourse.julialang.org/t/how-to-define-empty-indexedtables/6508 "2017-10-18T08:33:18Z")

</div>

I am unable to define empty IndexedTables, e.g. using IndexedTables, IndexedTables.Table t = Table(Columns(a=Int64\[\],b=String\[\]),Int64\[\]) t\[1,"a"\] = 1 t\[1,"b"\] = 2 t\[1,"c"\] = t\[1,"a"\] + t\[1,"b"\] BoundsError: attempt to …

---

## [Does the concept of type-stability apply to DataFrames or Tables?](https://discourse.julialang.org/t/does-the-concept-of-type-stability-apply-to-dataframes-or-tables/6434)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 21\
**Last updated:** [October 17, 2017, 8:57pm UTC](https://discourse.julialang.org/t/does-the-concept-of-type-stability-apply-to-dataframes-or-tables/6434 "2017-10-17T20:57:03Z")

</div>

I understand that if you write type stable code in Julia then it’s easier to optimize and hence will result in fast running code. But I am thinking about this in the DataFrames context, say I have a function that takes …

[Previous page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=549)

[Next page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=551)
