# How can I scale an object with Python without it moving?

My code is:

human_obj=bpy.data.objects["Armature"]


When I scale it with the command human_obj.scale=(1,1,1) the object remains at its original location. However, when I scale it with factors (1,2,1) or (2,1,1), the object will move to a new coordinate location based on the amount of scaling I've done in the x or y axis.

How can I scale the object so that it stays in the same location after scaling? It does not matter if I do this scaling in edit mode. When I return to object mode, it will jump to a new location for any scaling of x or y != 1

bpy.context.area.spaces[1].pivot_point='CURSOR'