Without actually seeing the codes, it's impossible to clarify the reason for the difference in outputs. Please provide the two pieces of code you are referring to.
Copyright QStack.ai, 2010-2023. Content on this site is licensed under the Creative Commons Attribution Share Alike 3.0 license.