NumCpp
2.4.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
replace.hpp
Go to the documentation of this file.
1
#pragma once
29
30
#include "
NumCpp/NdArray.hpp
"
31
32
namespace
nc
33
{
34
//============================================================================
35
// Method Description:
44
template
<
typename
dtype>
45
NdArray<dtype>
replace
(
const
NdArray<dtype>
& inArray, dtype oldValue, dtype newValue)
46
{
47
auto
returnArray = inArray.
copy
();
48
returnArray.
replace
(oldValue, newValue);
49
return
returnArray;
50
}
51
}
// namespace nc
nc::NdArray::copy
NdArray< dtype > copy() const
Definition:
NdArrayCore.hpp:2414
nc::replace
NdArray< dtype > replace(const NdArray< dtype > &inArray, dtype oldValue, dtype newValue)
Definition:
replace.hpp:45
nc::NdArray< dtype >
NdArray.hpp
nc
Definition:
Coordinate.hpp:44
nc::NdArray::replace
void replace(value_type oldValue, value_type newValue)
Definition:
NdArrayCore.hpp:4115
include
NumCpp
Functions
replace.hpp
Generated by
1.8.17