Skip to content

Commit

Permalink
minor typos and code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pramodk committed Jan 28, 2024
1 parent 0445509 commit 2ce953a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/python/modelspec/programmatic/mechanisms/nmodl2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ Description:
* x = random_normal(ranvar1) : mean 1.0, std 1.0
* x = random_normal(ranvar1, mean, std)
* x = random_ipick(ranvar1) : range 0 to 2^32-1

* x = random_dpick(ranvar1)


EXTERNAL
Expand Down
3 changes: 0 additions & 3 deletions docs/python/programming/math/random.rst
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,3 @@ NMODLRandom Class
NEURON: NMODLRandom wrapped handle is not valid
5 changes: 2 additions & 3 deletions src/nrniv/bbsavestate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2058,9 +2058,8 @@ void BBSaveState::mech(Prop* p) {
{
auto const size = ssi[p->_type].size; // sum over array dimensions for range variables
auto& random_indices = nrn_mech_random_indices(p->_type);
int size_random = int(random_indices.size());
std::vector<double*> tmp{};
tmp.reserve(size + size_random);
auto size_random = random_indices.size();
std::vector<double*> tmp(size + size_random);
for (auto i = 0; i < size; ++i) {
tmp.push_back(static_cast<double*>(p->param_handle_legacy(ssi[p->_type].offset + i)));
}
Expand Down
2 changes: 1 addition & 1 deletion src/oc/hoc_oop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ static void range_suffix(Symbol* sym, int nindex, int narg) {
double x{0.5};
if (narg) {
if (narg > 1) {
hoc_execerr_ext("%s range object can have only one arc length parameter",
hoc_execerr_ext("%s range object can have only one arg length parameter",
sym->name);
}
x = xpop();
Expand Down

0 comments on commit 2ce953a

Please sign in to comment.