You can machine some magnets, but due to the brittle nature of most magnets, it is recommended that you should contact the magnet manufacturer with the requisite skill sets.