diff --git a/Code/Mantid/Build/CMake/GNUSetup.cmake b/Code/Mantid/Build/CMake/GNUSetup.cmake
index aa1eac0b7912bb12783509e482bf48fd9c5ce37f..cc91e235a2880e384522bfd1bba7717223bf4463 100644
--- a/Code/Mantid/Build/CMake/GNUSetup.cmake
+++ b/Code/Mantid/Build/CMake/GNUSetup.cmake
@@ -15,7 +15,7 @@ elseif ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
 endif()
 
 # Global warning flags.
-set( GNUFLAGS "-Wall -Wextra -pedantic -Wconversion -Winit-self -Wpointer-arith -Wcast-qual -Wcast-align -fno-common" )
+set( GNUFLAGS "-Wall -Wextra -Wpedantic -Wconversion -Winit-self -Wpointer-arith -Wcast-qual -Wcast-align -fno-common" )
 # Disable some warnings about deprecated headers and type conversions that
 # we can't do anything about
 # -Wno-deprecated: Do not warn about use of deprecated headers.
diff --git a/Code/Mantid/Framework/PythonInterface/inc/MantidPythonInterface/kernel/Converters/NumpyFunctions.h b/Code/Mantid/Framework/PythonInterface/inc/MantidPythonInterface/kernel/Converters/NumpyFunctions.h
new file mode 100644
index 0000000000000000000000000000000000000000..452856c09428ff8ca60c88082c18ae76629f597c
--- /dev/null
+++ b/Code/Mantid/Framework/PythonInterface/inc/MantidPythonInterface/kernel/Converters/NumpyFunctions.h
@@ -0,0 +1,54 @@
+#ifndef NUMPY_FUNCTIONS_H
+#define NUMPY_FUNCTIONS_H
+/*
+  Copyright © 2011 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
+  National Laboratory & European Spallation Source
+
+  This file is part of Mantid.
+
+  Mantid is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  Mantid is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+  File change history is stored at: <https://github.com/mantidproject/mantid>.
+  Code Documentation is available at: <http://doxygen.mantidproject.org>
+*/
+#pragma GCC system_header
+
+#include <boost/python/list.hpp>
+#include "MantidKernel/WarningSuppressions.h"
+GCC_DIAG_OFF(cast - qual)
+// See
+// http://docs.scipy.org/doc/numpy/reference/c-api.array.html#PY_ARRAY_UNIQUE_SYMBOL
+#define PY_ARRAY_UNIQUE_SYMBOL KERNEL_ARRAY_API
+#define NO_IMPORT_ARRAY
+#include <numpy/arrayobject.h>
+GCC_DIAG_ON(cast - qual)
+
+/**functions containing numpy macros. We put them in a separate header file to
+  *suppress the warning
+  *ISO C++ forbids casting between pointer-to-function and pointer-to-object
+  */
+namespace Mantid {
+namespace PythonInterface {
+namespace Converters {
+namespace Impl {
+/// equivalent to macro PyArray_IterNew
+PyObject *func_PyArray_IterNew(PyArrayObject *arr);
+/// equivalent to macro PyArray_NewFromDescr
+PyArrayObject *func_PyArray_NewFromDescr(int datatype, const int ndims,
+                                         Py_intptr_t *dims);
+}
+}
+}
+}
+#endif // NUMPY_FUNCTIONS_H
diff --git a/Code/Mantid/Framework/PythonInterface/mantid/kernel/CMakeLists.txt b/Code/Mantid/Framework/PythonInterface/mantid/kernel/CMakeLists.txt
index 32975fce4226f3b7a7ac09dca016e6070120b638..02058243e4c2a308c227eebf75ec25646685c597 100644
--- a/Code/Mantid/Framework/PythonInterface/mantid/kernel/CMakeLists.txt
+++ b/Code/Mantid/Framework/PythonInterface/mantid/kernel/CMakeLists.txt
@@ -54,6 +54,7 @@ set ( SRC_FILES
   src/Converters/CloneToNumpy.cpp
   src/Converters/NDArrayToVector.cpp
   src/Converters/NDArrayTypeIndex.cpp
+  src/Converters/NumpyFunctions.cpp
   src/Converters/PyArrayType.cpp
   src/Converters/PyObjectToMatrix.cpp
   src/Converters/PyObjectToV3D.cpp
@@ -71,6 +72,7 @@ set ( SRC_FILES
 set ( INC_FILES
   ${HEADER_DIR}/kernel/Converters/CArrayToNDArray.h
   ${HEADER_DIR}/kernel/Converters/MatrixToNDArray.h
+  ${HEADER_DIR}/kernel/Converters/NumpyFunctions.h
   ${HEADER_DIR}/kernel/Converters/NDArrayToVector.h
   ${HEADER_DIR}/kernel/Converters/NDArrayTypeIndex.h
   ${HEADER_DIR}/kernel/Converters/WrapWithNumpy.h
diff --git a/Code/Mantid/Framework/PythonInterface/mantid/kernel/src/Converters/CloneToNumpy.cpp b/Code/Mantid/Framework/PythonInterface/mantid/kernel/src/Converters/CloneToNumpy.cpp
index bc85d3edd85fc7995c1bd4bfc7da52b5d838710c..736ddb7ce55d20191e7547fe4db5303a03d60b4f 100644
--- a/Code/Mantid/Framework/PythonInterface/mantid/kernel/src/Converters/CloneToNumpy.cpp
+++ b/Code/Mantid/Framework/PythonInterface/mantid/kernel/src/Converters/CloneToNumpy.cpp
@@ -3,17 +3,30 @@
 //-----------------------------------------------------------------------------
 #include "MantidPythonInterface/kernel/Converters/CloneToNumpy.h"
 #include "MantidPythonInterface/kernel/Converters/NDArrayTypeIndex.h"
-#include "MantidKernel/WarningSuppressions.h"
+//#include "MantidKernel/WarningSuppressions.h"
 #include <boost/python/list.hpp>
 
-GCC_DIAG_OFF(cast-qual)
-#define PY_ARRAY_UNIQUE_SYMBOL KERNEL_ARRAY_API
-#define NO_IMPORT_ARRAY
-#include <numpy/arrayobject.h>
-GCC_DIAG_ON(cast-qual)
+// GCC_DIAG_OFF(cast-qual)
+//#define PY_ARRAY_UNIQUE_SYMBOL KERNEL_ARRAY_API
+//#define NO_IMPORT_ARRAY
+//#include <numpy/arrayobject.h>
+// GCC_DIAG_ON(cast-qual)
+
+#include "MantidPythonInterface/kernel/Converters/NumpyFunctions.h"
 
 #include <string>
 
+/*PyArrayObject* function_PyArray_NewFromDescr(int datatype, const int ndims,
+Py_intptr_t *dims)
+{
+  return (PyArrayObject*)PyArray_NewFromDescr(&PyArray_Type,
+                     PyArray_DescrFromType(datatype),
+                     ndims, // rank
+                     dims, // Length in each dimension
+                     NULL, NULL,
+                     0, NULL);
+}*/
+
 namespace Mantid { namespace PythonInterface
   {
   namespace Converters
@@ -44,13 +57,16 @@ namespace Mantid { namespace PythonInterface
       {
         Py_intptr_t dims[1] = { static_cast<int>(cvector.size()) };
         int datatype = NDArrayTypeIndex<bool>::typenum;
-        PyArrayObject *nparray = (PyArrayObject*)
+        /*PyArrayObject *nparray = (PyArrayObject*)
           PyArray_NewFromDescr(&PyArray_Type,
                                PyArray_DescrFromType(datatype),
                                1, // rank
                                dims, // Length in each dimension
                                NULL, NULL,
-                               0, NULL);
+                               0, NULL);*/
+        PyArrayObject *nparray =
+            func_PyArray_NewFromDescr(datatype, 1, &dims[0]);
+
         for(Py_intptr_t i = 0; i < dims[0]; ++i)
         {
           void *itemPtr = PyArray_GETPTR1(nparray, i);
@@ -71,13 +87,15 @@ namespace Mantid { namespace PythonInterface
       PyObject *cloneND(const ElementType * carray, const int ndims, Py_intptr_t *dims)
       {
         int datatype = NDArrayTypeIndex<ElementType>::typenum;
-        PyArrayObject *nparray = (PyArrayObject*)
+        /*PyArrayObject *nparray = (PyArrayObject*)
           PyArray_NewFromDescr(&PyArray_Type,
                                PyArray_DescrFromType(datatype),
                                ndims, // rank
                                dims, // Length in each dimension
                                NULL, NULL,
-                               0, NULL);
+                               0, NULL);*/
+        PyArrayObject *nparray =
+            func_PyArray_NewFromDescr(datatype, ndims, &dims[0]);
         // Compute total number of elements
         size_t length(dims[0]);
         if(ndims > 1)
diff --git a/Code/Mantid/Framework/PythonInterface/mantid/kernel/src/Converters/NDArrayToVector.cpp b/Code/Mantid/Framework/PythonInterface/mantid/kernel/src/Converters/NDArrayToVector.cpp
index 85bfa66289008f6813b8eb91df6c0eeb6bd502b9..b36169327a7f1aa52b641822c665875aa0640d4b 100644
--- a/Code/Mantid/Framework/PythonInterface/mantid/kernel/src/Converters/NDArrayToVector.cpp
+++ b/Code/Mantid/Framework/PythonInterface/mantid/kernel/src/Converters/NDArrayToVector.cpp
@@ -6,9 +6,17 @@
 #include <boost/python/extract.hpp>
 
 // See http://docs.scipy.org/doc/numpy/reference/c-api.array.html#PY_ARRAY_UNIQUE_SYMBOL
-#define PY_ARRAY_UNIQUE_SYMBOL KERNEL_ARRAY_API
-#define NO_IMPORT_ARRAY
-#include <numpy/arrayobject.h>
+//#define PY_ARRAY_UNIQUE_SYMBOL KERNEL_ARRAY_API
+//#define NO_IMPORT_ARRAY
+//#include <numpy/arrayobject.h>
+
+#include "MantidPythonInterface/kernel/Converters/NumpyFunctions.h"
+/*namespace{
+PyObject* function_PyArray_IterNew(PyArrayObject *arr)
+{
+  return PyArray_IterNew((PyObject *)arr);
+}
+}*/
 
 namespace Mantid
 {
@@ -35,7 +43,7 @@ namespace Mantid
             void *input;
           } npy_union;
           npy_union data;
-          PyObject *iter = PyArray_IterNew((PyObject *)arr);
+          PyObject *iter = Converters::Impl::func_PyArray_IterNew(arr);
           npy_intp index(0);
           do
           {
diff --git a/Code/Mantid/Framework/PythonInterface/mantid/kernel/src/Converters/NumpyFunctions.cpp b/Code/Mantid/Framework/PythonInterface/mantid/kernel/src/Converters/NumpyFunctions.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5696352a6cacb38cdb90e5ff7b5e0a487572301c
--- /dev/null
+++ b/Code/Mantid/Framework/PythonInterface/mantid/kernel/src/Converters/NumpyFunctions.cpp
@@ -0,0 +1,22 @@
+#include "MantidPythonInterface/kernel/Converters/NumpyFunctions.h"
+
+namespace Mantid {
+namespace PythonInterface {
+namespace Converters {
+namespace Impl {
+
+PyObject *func_PyArray_IterNew(PyArrayObject *arr) {
+  return PyArray_IterNew((PyObject *)arr);
+}
+
+PyArrayObject *func_PyArray_NewFromDescr(int datatype, const int ndims,
+                                         Py_intptr_t *dims) {
+  return (PyArrayObject *)PyArray_NewFromDescr(
+      &PyArray_Type, PyArray_DescrFromType(datatype), ndims, // rank
+      dims, // Length in each dimension
+      NULL, NULL, 0, NULL);
+}
+}
+}
+}
+}