Skip to content

Commit

Permalink
Apply suggestions from code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed Nov 5, 2024
1 parent 8bae101 commit f716ee2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
4 changes: 0 additions & 4 deletions freud/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@

logger = logging.getLogger(__name__)

# numpy must be initialized. When using numpy from C or Cython you must
# _always_ do that, or you will have segfaults
# np.import_array()


class Cubatic(_Compute):
r"""Compute the cubatic order parameter :cite:`Haji_Akbari_2015` for a system of
Expand Down
8 changes: 2 additions & 6 deletions freud/order/Cubatic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file is from the freud project, released under the BSD 3-Clause License.

#include <cstring>
#include <functional>
#include <random>
#include <stdexcept>

#include "Cubatic.h"
Expand Down Expand Up @@ -71,11 +71,7 @@ tensor4 tensor4::operator*(const float& b) const

void tensor4::copyToManagedArray(util::ManagedArray<float>& ma)
{
// TODO: this may be possible with std::copy but this works as well.
for (unsigned int i = 0; i < 81; i++)
{
ma[i] = data[i];
}
std::copy(data.begin(), data.end(), ma.data());
}

//! Complete tensor contraction.
Expand Down
1 change: 0 additions & 1 deletion freud/order/Cubatic.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "VectorMath.h"
#include <array>
#include <memory>
#include <random>

/*! \file Cubatic.h
\brief Compute the cubatic order parameter for each particle.
Expand Down

0 comments on commit f716ee2

Please sign in to comment.